After reading, you will be able to:

  1. 1️⃣ Pick the merge method that matches your files.
  2. 2️⃣ Stack a folder of workbooks into one table without copying cells by hand.
  3. 3️⃣ Catch broken formulas and mismatched headers after a merge.
Spreadsheet Compare & Merge Tool for Excel - Combine Excel Files into One Screenshot.
️ Eugene - CEO at SoftOrbits, Candidate of Technical Sciences, has more than 16 years of expertise in software development, photo and multimedia applications, enhancing and transforming digital images and videos.
📅 Last updated on:  2026-10-09

Excel has four built-in ways to put two files together, so how to merge two Excel spreadsheets depends on the result you need. Move or Copy sends a sheet into another workbook. Power Query appends every file in a folder to one table. Consolidate adds matching cells, and a lookup formula pulls columns across by a shared ID. A copied sheet keeps formulas that point at the old file, and Power Query expects the same column headers in every file. When these routes do not fit, Spreadsheet Compare & Merge Tool for Excel appends workbooks and CSV files into one sheet without Excel installed.

What you'll need
  • Excel on a Windows desktop for the built-in routes
  • Copies of the files you want to merge, saved in one folder so the originals stay untouched
  • A desktop merge tool for the case where the headers do not line up or Excel is not installed (a later section covers one)
  • About 10 minutes for the longest route on this page

What you will learn
Apply in 10 min Saves 1 hMedium

Windows 11 / 10Free trial, no sign-up

Which method fits when you merge two Excel spreadsheets?

TL;DR

Append and lookup do different jobs. An append puts the rows of file B under file A, so the table gets longer. A lookup keeps the rows and adds columns from file B beside matching rows in file A. Decide which result you need first. Power Query and a merge tool append, while XLOOKUP and VLOOKUP look up.

A wrong method still returns a result: Consolidate on two customer lists returns sums, and 4,000 rows pasted under another 4,000 can put Phone values under Email.

MethodWhat you getSuitsDo headers have to match?Where it stops
Move or CopyEach sheet as its own tab in one workbookTwo files, a few sheetsNo, sheets stay separateNot available in Excel for the web. Formulas keep pointing at the source file
Copy and pasteRows of one sheet under the rows of anotherTwo small tablesYou line the columns up by eyeNothing checks that the columns agree
Power Query, From FolderOne table that refreshes when files changeA folder of files with one layoutYes. Same names and data types. Order may differExcel for Mac may not show From Folder in the menu
ConsolidateTotals, with SUM as the default functionSeveral ranges with one layoutSame positions or same labelsReturns summary numbers, never a list of rows
XLOOKUP or VLOOKUPExtra columns next to the rows you already haveTwo tables that share an ID columnOnly the key column mattersKeys that differ by a space come back as errors
VBA macroWhatever the macro was written to doA repeated job on many filesDepends on the codeCompany policy often blocks macros
Spreadsheet Compare & Merge Tool for ExcelOne sheet, or one sheet per file, saved as XLSX or CSVTwo files up to a whole folder, XLSX and CSV mixedNo. Columns match by header text or by positionAppends only, with no lookup by key

Check the files before you merge

A workbook locked with a password you no longer have will not open for Move or Copy or Power Query. Recover access with Excel password recovery.
A table that exists only as a PDF must become a spreadsheet file. Use a PDF to CSV converter. Then check the files:
  • Put the header in row 1 of every sheet, with no title lines above it
  • Spell each header the same way in every file, because most routes match columns by name
  • Keep one ID column (order number, SKU, email) if you plan to look up values or remove duplicates later
  • Add up the rows of all files and compare the total with the worksheet limit

1,048,576
rows is the most one Excel worksheet can hold, header row included, so that is the ceiling for any merge into a single sheet
Source

How do you merge one Excel file into another with Move or Copy?

TL;DR

Right-click the sheet tab, select Move or Copy, tick Create a copy and choose the other workbook under To book. The sheet lands in the destination file as a separate tab with its formatting and formulas. This works in desktop Excel only and suits two files that should remain separate tabs.

Move or Copy keeps each sheet as it is. The steps follow Microsoft's instructions for copying a worksheet to another workbook, with one practical addition at the start.

  • Open both workbooks on the desktop, so the destination shows up in the list.
  • Right-click the tab of the sheet you want to send and select Move or Copy.
  • Tick Create a copy. With the box clear, the sheet moves out of the source file instead.
  • Under To book, choose the destination workbook.
  • Under Before sheet, pick where the tab should sit and confirm.

To send several sheets in one pass, hold Ctrl and click each tab before you right-click. For the browser version, Microsoft says: "Copying worksheets to another workbook isn't currently possible in Excel for the web."

 The Move or Copy dialog in Excel with Create a copy ticked and the destination workbook selected..

When plain copy and paste is enough

For two short tables with the same columns, select the data rows of the second sheet without its header, copy them, and paste them into the first empty row under the first table. Scroll across the seam and check that every column still holds one kind of data. If the pasted rows change font or number format, paste again and pick Keep Source Formatting from the Paste Options button, or Values when you only want the numbers.

Why do formulas point at the old workbook after you copy a sheet?

TL;DR

A copied sheet keeps its formulas. A formula that referred to another sheet of the source file now refers to that file by name, so the new workbook depends on the old one. Remove the workbook name with Find and Replace, or copy the referenced sheets across together in one Move or Copy.

A reference that used to show a plain sheet name can include the source file in square brackets.
='[WB2.xlsx]sheetB'!A1
The fix comes from a Microsoft Tech Community thread about copying a sheet between two workbooks. Open Find and Replace on the copied sheet, type the workbook name with its square brackets into Find what, leave Replace with empty, and press Replace All. The formulas then look for sheetB inside the new workbook. A sheet with that name must exist there, so move linked sheets as a group.

If the source workbook uses a custom theme or color scheme that the destination file does not have, fonts and colors can look different after the move.

Run the merge on copies of the files. If Create a copy is not ticked, Move or Copy takes the sheet out of the source workbook, and saving that file afterwards makes the removal permanent.

How to combine Excel files into one with Power Query

TL;DR

Put the files in one folder, then select Data > Get Data > From File > From Folder and choose Combine & Load. Power Query reads every file and appends the rows to one table. Add a file later, refresh the query, and its rows join the table. The files have to share the same columns.

From Folder suits 12 monthly exports or one report per branch office. Microsoft's article on importing data from a folder lists Excel for Microsoft 365, Excel 2024, 2021, 2019 and 2016 under Applies To. Excel for Mac and Excel for the web are not on that list.

  • Copy the files into a folder that holds nothing else. Power Query takes every file in the folder and in its subfolders.
  • In a blank workbook, select Data > Get Data > From File > From Folder.
  • Browse to the folder and check the list of files that appears.
  • Select Combine > Combine & Load. Pick Transform Data instead if you need to filter the file list first.
  • In the Combine Files dialog, choose the Sample File and the sheet or table to read, then click OK.

Power Query analyzes one example file, by default the first in the list, to decide which columns to expect. If the first file is unusual, pick a typical file as the sample.
For exactly two workbooks, load each file with Data > Get Data > From File > From Excel Workbook. Open one query in the Power Query Editor and select Home > Append Queries to stack the other query under it.

What about Excel for Mac?

In Excel for Mac, From Folder may be missing from the Get Data menu. An answer on Microsoft Q&A calls this a known limitation compared with the Windows version. The suggested workaround: give Excel access to the folder, start a blank query and call the Folder.Files function with the folder path. Check your menu before planning around it.

What happens when the files have different column headers?

TL;DR

Power Query matches columns by name. Microsoft's folder-import article says "Each file should have the same schema with consistent column headers, data types, and number of columns. The columns do not have to be in the same order as the matching is done by column names." A different column order is fine, but different header spelling is a problem.

The Power Query overview of combining files says: "You can easily combine all files within a given folder, as long as they have the same file type and structure (including the same columns)."

In two exports of the same customer list, sales may call the first column Customer while finance calls it Client name. One file may also have a Region column that the other lacks. To the query, Customer and Client name are two unrelated columns. Microsoft's pages do not describe the combined table in that case, so do not assume the rows lined up. Open the result and look for columns filled for one file and empty for the other.

For files from two departments, budget time for fixing headers before the merge, whichever tool you use.

If the columns mean the same thing and sit in the same order, append by position, with column 1 under column 1. Copy and paste does that, as does the By position setting of a merge tool. If the order differs, rename the headers in copies of the files until they agree. No route on this page can identify Client name and Customer as the same field.

When does Consolidate merge spreadsheets, and when does it not?

TL;DR

Consolidate summarizes. It takes the same cells or labels from several ranges and returns one number for each, using SUM unless you choose another function. Use it for four regional budget sheets with one layout. It returns totals and drops individual rows from lists.

The sequence below comes from the Microsoft Support article titled Consolidate data in multiple worksheets.

  • On the master sheet, click the upper-left cell of the area where the result should appear.
  • Select Data > Consolidate.
  • In the Function box, pick the summary function. SUM is the default.
  • Click Collapse, select a source range on another sheet, expand the dialog again and click Add. Repeat for each range.
  • Tick Create links to source data if the totals should follow later changes, then click OK.

Microsoft sets two conditions for the source lists: "Each column must have a label (header) in the first row and contain similar data. There must be no blank rows or columns anywhere in the list." By position expects every range to have the same layout. By category matches row and column labels, so the ranges may be arranged differently when the labels are identical. A note under the steps adds: "You cannot create links when source and destination areas are on the same sheet."

 The Consolidate dialog in Excel with SUM selected and two source ranges added..

How to pull columns from one spreadsheet into another by a shared key

TL;DR

Use XLOOKUP, or VLOOKUP in older versions of Excel. Both read an ID in the first table, find the same ID in the second table and return a value from that row. The first table keeps its row count and gains columns. Use this when file A lists orders and file B holds prices for the same product codes.

Open both workbooks, click the first empty column of the main table and write the formula against the other file. XLOOKUP is available in Microsoft 365 and in Excel 2021 or later.

=XLOOKUP(A2, [Prices.xlsx]Sheet1!$A:$A, [Prices.xlsx]Sheet1!$C:$C, "not found")
The older equivalent needs the key in the leftmost column of the lookup range and a column number in place of a return range.
=VLOOKUP(A2, [Prices.xlsx]Sheet1!$A:$C, 3, FALSE)
Fill the formula down. Rows that return an error or "not found" have no partner in the second file. A trailing space can cause this, as can a product code stored as a number in one file and as text in the other. When the result looks right, copy the new column and paste it back as Values. That cuts the link to the second workbook.

 XLOOKUP formula in Excel that pulls prices from a second workbook by product code..

Can a VBA macro merge Excel files automatically?

TL;DR

Yes. A macro can open every workbook in a folder, copy the used rows and paste them under the last row of a master sheet. It can automate a weekly merge. Many office PCs block macros, and company policy may require an IT administrator to turn them back on.

To keep the code, save the workbook as a macro-enabled .XLSM file. A workbook received by email or download can have its macros blocked until you open the file's Properties in File Explorer and unblock it. If the organization applies the policy named Block macros from running in Office files from the Internet, that checkbox does not help and the request goes to IT. A thread on unblocking macros, listed under Sources, covers both situations.

For a one-time merge, Power Query does the append without code. Keep VBA for jobs where the merge has rules that no menu covers.

When is a desktop merge tool the shorter route?

TL;DR

Spreadsheet Compare & Merge Tool for Excel appends .XLSX, .XLSM, .CSV and .TSV files into a single sheet or one sheet per file, and saves the result as XLSX or CSV. Columns line up by header text or position. It works on a PC without Excel, and workbooks and CSV exports can sit in the same list.

As an Excel file combiner, it suits a folder that Power Query cannot combine cleanly. Matching by column name keeps every header found in any file, in the order first seen. A missing column leaves empty cells. Letter case and spaces at the edges of a header are ignored, so "Email" and "email " land in one column. Matching by position ignores header names.

Workbooks saved in the 1904 date system are converted. In a CSV file, values like 007 stay text. A damaged file is skipped and counted in the final message. If the result reaches the worksheet row limit, the tool writes everything that fit and says so.

500,001 rows
merged in 8.64 seconds when we combined 50 workbooks of 10,000 rows each into one sheet in our own test

Font, fill color and number formats carry over unless you tick Plain text. Formulas are carried as written and their references are not rewritten, so a relative reference can point at a different row after the merge.

The tool appends by rows and does not merge by a key column or have a command line. Charts, images, pivot tables, conditional formatting, borders and alignment are not carried into the result. The old .XLS format is not read, nor are .XLSB and .ODS, so resave those files as .XLSX first. The trial writes the first 50 rows of a merge.

Twenty exports by hand
Open a file, select the rows, copy, switch windows, find the last row, paste. Check the columns still line up. Repeat 19 times and hope no file was pasted twice.
VS
One list of files
Add the folder, set the order, choose how columns match and click once. The closing message tells you how many rows came from how many files.

How to merge Excel files in Spreadsheet Compare & Merge Tool

Open the program and choose Combine files

The start screen shows two cards. Click Combine files to open the merge screen.

 Start screen of Spreadsheet Compare & Merge Tool with the Combine files card..

Add the two spreadsheets or a folder of them

Use Add File(s) for single workbooks or Add Folder for a batch. You can drag files onto the window. For each workbook, the list shows the sheet name and the number of rows and columns.

 An Excel workbook and a CSV file added to the file list..

Put the files in the order you want the rows

Select a file and click the up or down arrow above the list, or drag the row to a new place. The list order becomes the result's row order.

 Up and down arrows that set the order of rows in the result..

Choose one sheet or a sheet per file

Under Merge type, pick Into a single sheet to stack all rows, or One sheet per file to keep each file on its own tab.

 Merge type options Into a single sheet and One sheet per file..

Tell the program how to line up the columns

Under Columns, pick By column name or By position. Under Also, tick First row is column names and Keep the header of the first file only so the header is not repeated inside the data.

 Columns setting with By column name selected and the header options ticked..

Name the output file and click Combine files

Save to already holds a suggested file name. Keep it or type your own, ending in .xlsx or .csv. The extension decides the format. Click Combine files and read the message with the row and file count. The program refuses to write over one of the source files.

 Save to field with an XLSX file name and the Combine files button..

Spreadsheet Compare & Merge Tool for Excel - Combine Excel Files into One Spreadsheet Compare & Merge Tool for Excel - Combine Excel Files into One

Spreadsheet Compare & Merge Tool for Excel by SoftOrbits is an Excel file combiner and a comparison tool in one window. It folds a folder of workbooks into a single file, then shows what changed between two versions of a table. The files are read by the program itself. Excel does not have to be installed on the machine that does the work.

How to combine two Excel sheets without duplicate rows

TL;DR

Append first, then remove duplicates in Excel. Select the merged table, choose Data > Remove Duplicates, tick the column that identifies a record and click OK. Append routes keep both copies of a duplicated row, and Spreadsheet Compare & Merge Tool for Excel does not remove duplicates.

The selected columns decide what counts as a duplicate. Tick every column and Excel removes only rows identical in all cells. Tick the ID column alone and it keeps the first row for each ID and deletes the rest, even when other cells differ. The surviving row is the one that came first, which may be the older address.

If the newer file should win, put it first in the merge. Sorting by a date column before removing duplicates has the same effect. Power Query has its own command, Home > Remove Rows > Remove Duplicates in the editor, and it runs again on every refresh. Microsoft warns that Power Query will not necessarily keep the first duplicate.

Write down how many rows each source file has before the merge. After removing duplicates, the total should equal the sum of the sources minus the number Excel reports as removed. If it does not, a file was added twice or left out.

How to compare two versions of a spreadsheet before merging them

TL;DR

If the two files are versions of one table, compare them before appending. An append doubles every unchanged row. A comparison shows which rows were edited, added or deleted, so you may need only the newer file and selected rows from the older one.

Excel's own aid is View > View Side by Side, with Synchronous Scrolling switched on. Both windows scroll together. This works for 50 rows, but an inserted row in a price list with a few thousand lines shifts everything below it.

The Compare two files mode of Spreadsheet Compare & Merge Tool takes exactly two files and shows them in two synchronized grids, with buttons to jump to the previous and next difference. Rows can be matched row by row or by a key column. A third setting matches them automatically and detects inserted and deleted rows. Matching by key suits two exports that share an order number but arrive sorted differently. The differences export as an XLSX file with highlights or as a CSV list. A PDF or HTML report is available for the other version's owner.

Can you merge Excel files online, and is it safe?

TL;DR

Yes, online mergers exist. The files leave your PC and a copy sits on a server you do not control. For a class schedule that is fine. For payroll, customer lists or anything under a confidentiality agreement, use a route that runs locally: Excel itself or a desktop tool.

In one Microsoft Tech Community thread, the author had 33 Excel files in one folder and could not find From Folder in Excel for Mac. An online service came first, and a workaround posted later in the same thread gave Excel access to the folder.

Excel for the web cannot copy a sheet into another workbook. If a website is the only option, strip columns that hold personal data from the copies before uploading.

Spreadsheet Compare & Merge Tool for Excel - Combine Excel Files into One Spreadsheet Compare & Merge Tool for Excel - Combine Excel Files into One
Merge two Excel spreadsheets with Move or Copy, Power Query, Consolidate or XLOOKUP. See where each method breaks and how to merge files with mixed headers.
Spreadsheet Compare & Merge Tool for Excel - Combine Excel Files into One Screenshot.


🙋Frequently Asked Questions

Yes. If each spreadsheet should stay a separate tab, use Move or Copy to send one sheet into the other workbook. If the rows should form a single table, append them with Power Query or copy and paste. Both need Excel on the desktop, and the append needs the same column headers in both files.

Open both files in desktop Excel, right-click the sheet tab in the first file and select Move or Copy. Tick Create a copy, choose the second workbook under To book and confirm. The sheet arrives with its formatting. Formulas that referred to other sheets point back at the first file until you fix them.

Put the files in one folder and use Data > Get Data > From File > From Folder, then Combine & Load. Excel builds one table out of them. All files need the same column headers and data types. With mixed headers, or without Excel on the PC, a desktop merge tool does the same append.

Build the merge once in Power Query with From Folder. Saving a new file into the folder and clicking Refresh All adds its rows to the table. A VBA macro is another option, but macros are blocked on many company PCs and may need approval from IT.

Use Data > Consolidate when you want totals. Pick a function such as SUM, add a range from each file and confirm. Excel returns one summary value per label or position. To list every row in one table, use Power Query.

Load each sheet as its own query, then select Home > Append Queries in the Power Query Editor and pick the queries to stack. For sheets in separate files, From Folder loads and appends them in one step. The columns match by header name, so fix spelling differences first.

Excel for the web cannot copy a worksheet into another workbook. Microsoft states that this is not currently possible in the browser version and points to the desktop app. Inside a single workbook you can still copy and paste ranges between sheets online. To bring sheets together from several files, open the workbooks in desktop Excel.

Write an XLOOKUP formula that takes the value to search for, the column to search in and the column to return. In versions older than Excel 2021, VLOOKUP does the same with a column number. Both return one value per row, such as a price or name beside an ID.

We have not tested that service on workbooks, so we will not describe what it does with two spreadsheets. With any online tool, the files are uploaded to a server outside your control. If the spreadsheets hold customer or salary data, merge them locally.

Fix that before the merge. Most routes read the first row as column names, so a title line or logo row above the header shifts everything. Delete the extra rows in copies of the files. In Power Query, use Remove Top Rows and Use First Row as Headers.

Sources

  • Microsoft Q&A: how to unblock macros on an Excel document the Unblock checkbox in file Properties and the company policy that overrides it
  • Microsoft 365 Insider blog: the From Folder connector in Excel for Mac (https://techcommunity.microsoft.com/t5/microsoft-365-insider-blog/refresh-data-using-power-query-s-from-folder-connector-in-excel/ba-p/4227534) the rollout of the folder connector to the Mac Beta Channel