Reorder Excel Columns by Header Name with Power Query
Question details
The user needs to standardize Excel column order across source files that contain the same headers in different positions.

- Product
- Microsoft Excel Power Query
- Device & OS
- not provided
- Scenario
- Multiple tables or files must be combined into one consistent template without manually moving columns each time.
- Observed behavior
- The source files use matching header names but their columns appear in different orders.
Make sure every source table uses a single header row and that matching fields have identical header spelling. Define the final column order you want before building the query.
Use Power Query to combine files and set a fixed column order
Use this method when recurring source files contain the same fields in different column positions and need a refreshable, consistent output.
Power Query identifies fields by their column headers rather than their original positions. After you combine the files and arrange the output columns once, newly added files can be included by refreshing the query.
Place the Excel files to combine in a single folder. Ensure the relevant worksheet table in each file uses the same set of header names.
In Excel, select Data > Get Data > From File > From Folder. Browse to the folder, select it, and choose Combine & Transform Data.
In the Combine Files dialog, select the worksheet or table that contains the data, then choose OK to open Power Query Editor.
In Power Query Editor, drag column headers into the required template order, or select Home > Manage Columns > Choose Columns and select fields in the desired order. Power Query keeps the selected output order by header name.
Select Home > Close & Load to create the output table. When files are added or replaced in the folder, select Data > Refresh All to apply the same column order again.

Reorder columns in a single imported table by selecting headers
Use this option when you are working with one table rather than a folder of recurring files.
Use WPS Office for everyday Excel-compatible spreadsheet work
Power Query is a Microsoft Excel feature, so query-specific issues must be handled in Excel. For everyday spreadsheet editing, sorting, formulas, and column organization, WPS Office is a free, lightweight alternative with a familiar interface and seamless file migration.

Frequently Asked Questions
Does Power Query match columns by name or by their original position?
Power Query works with column names. When files are combined, fields with the same header are matched even when they appear in different source positions.
What happens if a source file is missing one of the expected headers?
The query can still load the available fields, but a missing expected column may produce null or blank values in the output. Check the header spelling and source-table structure before refreshing.
Can I set the final column order only once?
Yes. Arrange the columns in Power Query Editor and load the query. The saved reorder step is applied again whenever you use Data > Refresh All.
How do I combine new Excel files without rebuilding the query?
Save new files in the same folder used by Data > Get Data > From File > From Folder, then select Data > Refresh All. Power Query imports the files and applies the saved transformation steps.
Can VBA reorder Excel columns by header name instead?
Yes, VBA can locate headers and move columns programmatically, but Power Query is usually easier for repeatable file-combining workflows because it preserves the transformation steps and refreshes them without maintaining code.




