Power Query Problems

Reorder Excel Columns by Header Name with Power Query

Steven ParkerSteven Parker Nov 12, 2026 868 views

Question details

The user needs to standardize Excel column order across source files that contain the same headers in different positions.

Reorder Excel Columns by Header Name with Power Query
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.
Before you start

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.

Solution 1Recommended

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.

1
Store source files in one folder

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.

2
Connect to the folder

In Excel, select Data > Get Data > From File > From Folder. Browse to the folder, select it, and choose Combine & Transform Data.

3
Confirm the combined table

In the Combine Files dialog, select the worksheet or table that contains the data, then choose OK to open Power Query Editor.

4
Arrange the columns by header name

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.

5
Load and refresh the result

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.

Use Power Query to combine files and set a fixed column order
Consistent output order: Once the reorder step is saved, source files can use different original column positions as long as the required headers remain consistent.
Free Microsoft Office alternative

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.

Organize and reorder spreadsheet columns with familiar worksheet tools.Open and edit Microsoft Excel .xlsx, .xls, and .csv files.Use a lightweight, free office suite for everyday data preparation.Work with a familiar ribbon-style interface for a smooth transition from Microsoft Office.
microsoft office alternative - wps office

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.