Rename a column (Power Query)

Applies To
Excel for Microsoft 365 Excel 2024 Excel 2021

You can rename a column header to make it clearer. You can rename only one column at a time.

Note

To prevent column name conflicts, Power Query automatically creates unique names for columns created by other commands. Table column names must be unique. If you rename a column to a name that already exists, an error is returned.

Rename a column

  1. To open a query, locate one previously loaded from the Power Query Editor, select a cell in the data, and then select Query > Edit. For more information, see Create, load, or edit a query in Excel.

  2. Select a column, and then select Transform > Rename. You can also double-click the column header.

    Screenshot that shows renaming a column header.

  3. Enter the new name. 

About data source column headers

Renaming a column header in Power Query doesn't rename the original data source column header. If a column header in the data source changes after the query is created, Power Query might no longer find the expected column name and could return an error. This can happen, for example, when someone changes a column header in an imported external data source. If this happens, you can receive the error:

“The column '<column name>' of the table wasn't found.”

To correct the query error, select Go To Error in the yellow message box, and correct the formula in the formula bar. But proceed carefully. Whenever you change a previous step under Applied Steps in the Query Settings pane, subsequent steps might also be affected. To confirm your fix, refresh the data by selecting Home > Refresh Preview > Refresh Preview.

See also

Power Query for Excel Help

Rename columns

Promote or demote rows and column headers (Power Query)

Add or change data types (Power Query)