ConsoliSheet

Home / Guides

PRACTICAL GUIDE

How to combine Excel files with different column names

By ConsoliSheet · Updated

The difficult part is rarely opening the files. It is deciding which columns actually mean the same thing before you combine a single row.

Quick answerMatch columns by their heading, never by their position. Agree the output columns you need first. Columns that differ only in order or formatting (capitals, spaces, underscores) can be lined up automatically. Columns that only some files have should be kept, with blanks for the other files. Differently worded headings such as Customer and Client need a deliberate decision before they share a column, because similar names do not prove identical meaning. In ConsoliSheet, certain possible matches are suggested for your approval, with Keep separate selected by default; you can also choose other matches manually. Add a Source File column so every row can be traced. You can do this by hand in Excel, with rename steps in Power Query, or in ConsoliSheet.

Customer suggested match

Client
Customer

Region manual decision

Territory
Region

Gross Sales or Net Sales?

SalesambiguousRevenueambiguous
Hold for reviewmeaning unconfirmed

A worked example: two files, the same data, different headings

Two regional teams send this month’s sales. Both started from the same template, and both describe the same kind of record: who bought what, how many, and for how much.

north.xlsx

CustomerSKUQuantityRevenue
2Acme LtdBX-10012480.00
3Halden & CoBX-2205310.00

south.xlsx

ClientProduct CodeQtySales
2Brook SuppliesBX-1008320.00
3Marlow FoodsCT-01520150.00
Same structure, four different headings. A third file, west.csv, has the columns in a different order and adds a Region column.

Pasting south.xlsx under north.xlsx appears to work, because the columns happen to be in the same order. That is luck rather than a method. The moment west.csv arrives with revenue, customer, sku, quantity, Region, position-based copying puts revenue figures under Customer and customer names under SKU, and nothing warns you.

There are really two separate questions here. Which columns are the same column written differently, and which are different columns that happen to look alike? The first is mechanical. The second needs someone who knows the data.

The kinds of column difference, and which are safe to resolve automatically

DifferenceExampleSafe to resolve automatically?What to do
Column orderRevenue is first in west.csvYesMatch by heading, not position.
Formatting onlycustomer, Customer , CUSTOMER; product_code and Product CodeYesNormalise capitals, spaces, underscores and hyphens.
Extra columnRegion only exists in west.csvYesKeep it, and leave it blank for files that don’t have it.
Missing columnOne file has no QuantityYesLeave that file’s values blank. Never shift its other columns sideways.
AbbreviationQty and QuantityUsually, but confirmConfirm once. Check the values look alike.
SynonymCustomer and ClientNeeds a decisionConfirm they describe the same thing before merging.
Same idea, different systemSKU and Product CodeNeeds a decisionOnly merge if both use the same code list. Compare a few sample values.
Similar name, different measureRevenue and Sales; Gross Sales and Net SalesNoCheck the definitions. One may include VAT, discounts or returns.
Rule of thumb: normalise formatting automatically, but require a person to confirm anything where the underlying meaning could differ.

Why files from different people stop matching

Shared templates drift. One person renames a heading to match the language their team uses, another inserts a column for their own notes, a third exports from a system that names things its own way. Each change is reasonable locally. The problem only appears when the files are combined. This gradual divergence is often called spreadsheet schema drift, and it is the main reason a process that worked in January breaks by April.

Similar names are not proof of identical meaning

Capitalisation and spacing differences are usually safe to normalise automatically. Business terms are a different matter: “Gross Sales” and “Net Sales” look related but describe different figures, and treating them as interchangeable will quietly corrupt a report.

  • Revenue and Sales. In one team “Sales” means invoiced value including VAT; in another it is net of returns. Merged into one column, the total is meaningless, yet it looks perfectly plausible.
  • SKU and Product Code. If one supplier uses your internal codes and another uses its own catalogue numbers, a merged column joins to the wrong products later.
  • Wholesale Price, Trade Price and Cost. These can be three different numbers for the same item. Similar wording is exactly where automatic matching is most tempting and most dangerous.

A good test: look at five sample values from each column side by side. If you cannot say with confidence that they measure the same thing in the same unit, keep the columns separate until someone who owns the data decides.

Method 1: by hand in Excel

For a handful of files, this is entirely reasonable.

1. Write the target header row. In a new workbook, type the output columns you want: Customer, SKU, Quantity, Revenue, Region, Source File.
2. Keep a mapping list. On a second sheet, record each source heading and the output column it goes to: Client → Customer, Product Code → SKU, Qty → Quantity. Writing it down makes the decision visible and reusable next month.
3. Copy column by column, by heading. For each file, copy each column into the output column it maps to, not into the next free position. Fill Source File with the file name.
4. Check the totals. The row count should equal the data rows in all the files added together, and column totals should match each file’s own totals.

It works, but it is slow, and the copying step is where values land in the wrong column. If you do this every month, use one of the methods below.

Method 2: Power Query

Power Query’s From Folder import is excellent when every file shares one structure. When headings differ, the reliable pattern is: rename each file’s columns to your standard names first, then combine. Table.Combine lines tables up by column name, keeps every column, and fills missing ones with null.

let
    Files    = Folder.Files("C:\Reports\Sales"),
    Xlsx     = Table.SelectRows(Files, each [Extension] = ".xlsx"),
    Renames  = {{"Client", "Customer"}, {"Product Code", "SKU"},
                {"Qty", "Quantity"}, {"Sales", "Revenue"}},
    Prepared = Table.AddColumn(Xlsx, "Data", (f) =>
        let
            Sheet   = Excel.Workbook(f[Content], true){0}[Data],
            Renamed = Table.RenameColumns(Sheet, Renames, MissingField.Ignore)
        in
            Table.AddColumn(Renamed, "Source File", each f[Name])),
    Combined = Table.Combine(Prepared[Data])
in
    Combined
  • MissingField.Ignore lets one rename list cover every file, even files that don’t contain some of the old names.
  • The rename list is your mapping decision, written down. Add to it when a new variation appears.
  • A file containing both Client and Customer makes the rename fail, because the column already exists. Decide which one wins first.
  • {0} takes the first sheet or table in each workbook, and the headings must be on its first row. If files have title rows above the headings, remove them before promoting headers.

If you would rather not maintain the query, or the files change shape every month, a guided tool can do the same job. Power Query Combine Files problems covers the common errors in detail.

Method 3: ConsoliSheet

ConsoliSheet is built for exactly this situation: spreadsheets from different people or systems that describe the same data in slightly different shapes.

UploadUp to 50 XLSX or CSV files, mixed freely.
Find each tableTitle rows, spacers and separate calculations are set aside.
Line up by headingOrder doesn’t matter; formatting differences are matched automatically.
ReviewPossible semantic matches require approval; other headings can be combined manually.
DownloadOne XLSX, with a Source File value on every row.

Columns that only some files have are kept, with blanks for the rest. ConsoliSheet can suggest Client → Customer, Product Code → SKU and Qty → Quantity, but the default is to keep them separate until you accept. Other pairs, such as Sales → Revenue and Territory → Region, are not suggested; you may combine them manually after checking their meaning. A refused or untouched suggestion leaves both columns separate. Review the proposed columns and preview the result before downloading.

A tested example: five monthly reports that don’t quite match

To show exactly what happens, we built five small monthly sales reports with the problems described above, ran them through ConsoliSheet and published both the files and the result. Every customer and product code is invented.

Select any screenshot to open it at full size.

The problem: five months, five slightly different files

FileWhat is different
January.xlsxThe baseline: Customer, SKU, Quantity, Revenue, Region
February.xlsxThe same fields in a different order, with headings that differ only in capitals and spaces (REVENUE, customer, Sku)
March.csvSemicolon-separated, with different words: Client, Product Code, Qty, Sales, Territory
April.xlsxTwo title rows and a blank row above the table; extra Sales Rep and Notes columns
May.xlsxNo Region column; a SUM total row under the data; a short notes block beside the table

What ConsoliSheet resolves automatically

  • It finds each table: April’s data starts below its title rows, and May’s notes block is not treated as data.
  • It lines up February’s headings with January’s, despite the different capitals, spacing and column order.
  • It keeps Sales Rep and Notes, which only April has, and leaves them blank for the other months. Region is blank for May.
  • It leaves out May’s total row, because it is a SUM of the rows above, and tells you it has done so.
  • It reads March’s semicolon-separated CSV alongside the Excel files.

Before you make any decision, the five files produce twelve columns, because March’s five differently worded headings are kept apart:

ConsoliSheet’s proposed columns before any decision: 12 business columns, with Client, Product Code, Qty, Sales and Territory kept as separate columns, plus the Source File system column
Before any decision: 12 columns. Nothing has been combined on a guess.

Three possible matches, suggested but not applied

ConsoliSheet recognises a small, deliberately cautious set of wording differences. Here it suggests three, all from March: Client → Customer, Product Code → SKU and Qty → Quantity. Each suggestion starts on Keep separate, so doing nothing leaves the columns apart. Many synonyms are not recognised at all; those are left for you to decide.

Three ConsoliSheet match cards for March.csv: Client may match Customer, Product Code may match SKU, Qty may match Quantity, each with Keep separate selected by default
Each suggestion explains itself and starts on Keep separate. The notice below the cards reports May’s excluded total row.

We checked a few values in each pair and chose Use for all three. That leaves nine columns.

Two decisions only a person can make

Sales → Revenue and Territory → Region are not suggested. In many businesses Sales and Revenue are different figures, for example gross and net, and a territory is not always the same thing as a region. In these files they do mean the same thing, so we combined them ourselves with Combine two columns yourself. Each manual combination is listed with its file and can be undone.

The Combine two columns yourself panel listing Sales from March.csv into Revenue and Territory from March.csv into Region, each with an Undo link
Manual decisions are listed with their source file and can be undone.

ConsoliSheet refuses a combination that would put two values in one place, for example when the same file already has both columns. It keeps both columns and explains why.

The result: seven business columns plus Source File

ConsoliSheet’s proposed columns after the decisions: 7 business columns, Customer, SKU, Quantity, Revenue, Region, Sales Rep and Notes, plus the Source File system column
After three accepted suggestions and two manual decisions: 7 columns plus Source File.

The completed workbook has 30 rows: six from each file, in file order and in each file’s original row order. Source File on every row names the spreadsheet it came from.

  • Left out: May’s SUM total row, May’s notes block and April’s title rows. Nothing else.
  • Kept: every data row and every filled value from the five files. This sample contains no exactly repeated rows, so it does not test duplicates; ConsoliSheet’s handling of those (exact duplicate rows are kept, not removed) was confirmed in separate production acceptance testing.
  • Blank on purpose: Region for May, and Sales Rep and Notes for every month except April.
  • Worth knowing: March’s numbers arrive as text, for example 440.0. ConsoliSheet does not yet convert numbers in CSV files, so convert that column in Excel before you calculate with it. A total typed in as a plain number, rather than a formula, would be kept as an ordinary row.
  • Not remembered: these decisions apply to this consolidation only. ConsoliSheet does not save them for next month’s files.
See all 30 rows of the completed workbook
RowCustomerSKUQuantityRevenueRegionSales RepNotesSource File
2Acme LtdBX-1005200NorthJanuary.xlsx
3Halden & CoBX-22010620NorthJanuary.xlsx
4Brook SuppliesCT-01515112.5SouthJanuary.xlsx
5Marlow FoodsDL-330354WestJanuary.xlsx
6Kestrel PrintBX-1008320SouthJanuary.xlsx
7Oakfield DentalCT-0151397.5WestJanuary.xlsx
8Acme LtdBX-1008320NorthFebruary.xlsx
9Halden & CoBX-22013806NorthFebruary.xlsx
10Brook SuppliesCT-01518135SouthFebruary.xlsx
11Marlow FoodsDL-3306108WestFebruary.xlsx
12Kestrel PrintBX-10011440SouthFebruary.xlsx
13Oakfield DentalCT-01516120WestFebruary.xlsx
14Acme LtdBX-10011440.0NorthMarch.csv
15Halden & CoBX-22016992.0NorthMarch.csv
16Brook SuppliesCT-015430.0SouthMarch.csv
17Marlow FoodsDL-3309162.0WestMarch.csv
18Kestrel PrintBX-10014560.0SouthMarch.csv
19Oakfield DentalCT-015215.0WestMarch.csv
20Acme LtdBX-10014560NorthJ. PatelRepeat orderApril.xlsx
21Halden & CoBX-2202124NorthS. OkaforApril.xlsx
22Brook SuppliesCT-015752.5SouthR. ByrneApril.xlsx
23Marlow FoodsDL-33012216WestJ. PatelRepeat orderApril.xlsx
24Kestrel PrintBX-10017680SouthM. KowalskiApril.xlsx
25Oakfield DentalCT-015537.5WestS. OkaforApril.xlsx
26Acme LtdBX-10017680May.xlsx
27Halden & CoBX-2205310May.xlsx
28Brook SuppliesCT-0151075May.xlsx
29Marlow FoodsDL-33015270May.xlsx
30Kestrel PrintBX-1003120May.xlsx
31Oakfield DentalCT-015860May.xlsx

The completed workbook was produced by ConsoliSheet’s processor, the version that runs on consolisheet.com, from exactly these files and decisions. When we ran the same files on the live site, its preview showed the same first rows.

What is free

Source File does not count toward the Free plan’s five business columns. This result has seven, so on consolisheet.com the complete download is a paid result; uploading, reviewing, confirming and a preview of the first rows are free. With five business columns or fewer, the complete download is free.

ConsoliSheet’s free preview of the consolidated result, showing the first 15 of 30 rows with the Source File column
The free preview: the first 15 of 30 rows.

Download the example

Download the files and try the same steps yourself at Quick Consolidate. Every file is invented sample data.

Which method should you use?

Your situationUsually the best approach
Two or three files, a one-off jobBy hand in Excel
The same template every month, and you are comfortable with queriesPower Query with a rename list
Files from different people or systems that don’t quite match, especially when the differences changeConsoliSheet
A scheduled pipeline feeding a database or warehouseA workflow or ETL tool, or Python

For a fuller comparison, including Python and online mergers, see the best ways to combine multiple Excel files.

Keep a trace to the source

Add a Source File column to the combined output. When a number looks wrong later, this is what lets you go back to the exact spreadsheet it came from instead of re-checking everything.

Common questions

How do I combine Excel files with different column names?

Match columns by heading rather than position. Line up columns that differ only in order or formatting automatically, keep columns that only some files have, and decide deliberately whether differently worded headings, such as Customer and Client, are the same field before merging them. Add a Source File column so each row can be traced.

Does column order matter?

Not if you match by heading rather than position. Position-based copying is exactly what causes values to land under the wrong column when files differ.

What if a column exists in only one file?

Decide deliberately whether it belongs in the output. Leave it blank for the other sources rather than letting its presence shift unrelated values sideways.

Should Customer and Client be merged into one column?

Only when someone who knows the data confirms they describe the same thing. ConsoliSheet may suggest Client → Customer, but Keep separate is selected by default. Sales and Revenue require a manual decision; even suggested pairs such as SKU and Product Code still need checking.

Does ConsoliSheet combine Sales and Revenue automatically?

No. Sales and Revenue are not suggested, because in many businesses they are different figures. If they mean the same thing in your files, combine them yourself in the review; the decision applies to that consolidation only.

Can Power Query combine files with different column names?

Yes, with extra steps. Rename each file’s columns to standard names, for example with Table.RenameColumns and MissingField.Ignore, then combine with Table.Combine, which keeps every column and fills missing ones with null.

How do I merge Excel files without losing columns?

Combine by column name and keep the union of all columns, leaving blanks where a file has no value. Tools that copy by position, or that take their column list from the first file, can drop or misplace columns that only later files have.

How do I know which file each row came from after combining?

Add a column holding the source file name to every row before or while combining. ConsoliSheet adds a Source File column automatically; in Power Query, add it per file as in the example above.

Have files like this to combine?

Upload your Excel or CSV files and ConsoliSheet lines the columns up by heading rather than position. Headings that differ only in capitals, extra spaces, underscores or hyphens are matched for you; selected wording variants are suggested for your approval, and you can map other headings manually. Nothing is combined on a semantic guess.

Try Quick Consolidate