The fastest way depends on what you're merging

Merging two Excel files means combining data from separate workbooks into a single file. The method you choose depends on whether the files have the same structure, how much data they contain, and whether you want to preserve the original files.

If both files have identical columns and you want to stack the rows on top of each other, copy and paste is usually fastest. If the files have different structures or you need to match data from both files side by side, you'll use formulas or a built-in feature called consolidation. If you're combining entire sheets from multiple workbooks into one file, you can copy the sheets themselves rather than just the data.

Key Takeaways

  • Copy and paste works best when both files have the same column layout and you want to combine all rows into one sheet.
  • The VLOOKUP or INDEX/MATCH formula lets you pull matching data from a second file into your primary file without duplicating columns.
  • Data consolidation is built into Excel and automatically sums or counts matching rows from multiple files without manual formulas.
  • You can copy entire sheets from one workbook to another by right-clicking the sheet tab and selecting Move or Copy.
  • Saving both files in the same folder makes it easier to reference one file from inside the other using external links.

Copy and paste when files have the same structure

If both Excel files have identical columns in the same order, the simplest approach is to open both files side by side and copy all the data rows from the second file into the first.

Open the first file in Excel. Open the second file in a separate Excel window — go to File, then Open, and select the second file. Arrange the windows so you can see both on screen at once. In the second file, select all the data you want to move (usually everything except the header row, since your first file already has column names). Right-click and select Copy. Switch to the first file, click the first empty cell below your existing data, right-click, and select Paste. Excel will paste all rows at once.

After pasting, check that the data landed in the correct columns. If the second file had extra columns you don't need, delete them before pasting, or delete them from the pasted data afterward. Save the first file when you're done.

Use VLOOKUP or INDEX/MATCH to pull data from a second file

If the two files have different structures — for example, one file has customer names and addresses, and the other has customer IDs and purchase amounts — you can use a formula to match and pull data from the second file into the first without retyping anything.

Open both files. In your primary file, create a column for the data you want to pull from the second file. In the first cell of that column, type a VLOOKUP formula. The basic structure is =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]). For example, if you're looking up a customer ID in column A and want to find their purchase amount from a second file, you might type =VLOOKUP(A2,[SecondFile.xlsx]Sheet1!$A$1:$B$100,2,FALSE). Replace SecondFile.xlsx with your actual filename, Sheet1 with the sheet name, and adjust the cell range to match where your data actually sits.

Press Enter. If the formula works, copy it down to all rows that need it by clicking the cell, then dragging the small square at the bottom right corner down as far as you need. If the formula returns #N/A, the lookup value doesn't exist in the second file, or the range is wrong. If you find VLOOKUP confusing, INDEX/MATCH does the same job with a different syntax and is often more flexible — search "INDEX MATCH formula Excel" for examples that match your situation.

Consolidate data automatically with Excel's built-in tool

If you have multiple files with the same row and column structure and you want Excel to automatically sum, count, or average matching rows, use the Data Consolidation feature. This is faster than formulas if you have many files to merge.

Open your primary file. Go to the Data tab at the top, then select Consolidate (it's usually in the Data Tools group). A dialog box will open. In the Function dropdown, choose what you want Excel to do — Sum, Count, Average, Max, or Min. Under Reference, click the folder icon, then navigate to and select the range of data in your second file (for example, Sheet1!$A$1:$C$50). Click Add. Repeat for any additional files. Make sure the "Use labels" checkbox is checked if your data has headers. Click OK.

Excel will create a new consolidated sheet showing the combined results. If you have many files to merge this way, consolidation saves time because you don't write formulas for each column.

Copy entire sheets from one workbook to another

If you want to move or copy complete sheets (not just data) from one file into another, right-click the sheet tab at the bottom of the window. Select Move or Copy. A dialog will open showing all open workbooks. Select the destination file and choose where in that file the sheet should go. Check the "Create a copy" box if you want to keep the original sheet in the second file. Click OK.

The sheet will appear in your primary file with all its formatting, formulas, and data intact. This method is useful when you're combining reports or worksheets that don't need to be merged row by row, but rather kept as separate tabs in one file.

Save files in the same folder to use external links

If you want your primary file to always pull the latest data from a second file without copying anything, you can create an external link. This is useful when the second file updates regularly and you want your primary file to reflect those changes automatically.

Save both files in the same folder on your computer. In your primary file, type a formula that references the second file. The syntax is =[SecondFile.xlsx]Sheet1!A1. This formula will display whatever value is in cell A1 of Sheet1 in the second file. If the second file updates, your primary file will show the new value the next time you open it (Excel will ask if you want to update external links).

External links work best when both files stay in the same folder. If you move one file, the link may break. If you plan to email the file or move it to a different computer, copy and paste the values instead, because external links won't work if the second file isn't in the expected location.

Frequently Asked Questions

What if the two files have different numbers of columns?

Copy only the columns you need from the second file, or use a formula like VLOOKUP to pull specific columns into your primary file. If you paste everything and get extra columns, select and delete them after pasting.

Can I merge more than two Excel files at once?

Yes. Use copy and paste repeatedly (paste the second file, then paste the third file below it), or use Data Consolidation, which lets you add as many files as you need in the dialog box. For very large merges, consolidation is faster.

Will merging files delete the original files?

No. Copy and paste, formulas, and consolidation all leave the original files untouched. Only the Move Sheet option removes the sheet from the second file — and you can undo that if needed. Always save your primary file with a new name if you want to keep the originals separate.

What does #REF! error mean in a formula?

It means Excel can't find the file or range you referenced. Check that the filename is spelled correctly, the file is still in the same location, and the sheet name and cell range match what's actually in the file.

How do I remove duplicate rows after merging?

Select all your data, go to the Data tab, and click Remove Duplicates. Choose which columns Excel should use to identify duplicates — usually all of them — and click OK. Excel will delete rows that are identical across those columns.