The fastest way depends on what you're combining

If you have two Excel files and need them in one place, the method you choose depends on whether you're combining data from the same columns (stacking rows) or pulling in new columns from a second file. The simplest approach is copying and pasting, which works for small files. For larger files or data you'll update regularly, using formulas or Excel's built-in merge tools saves time and reduces mistakes.

Excel doesn't have a single "join files" button, so you'll need to decide whether to work within one file or keep them separate and link them. Most people end up doing some combination of both — opening both files side by side, then moving data into a single master file.

Key Takeaways

  • Copying and pasting works for small datasets, but formulas like VLOOKUP or INDEX/MATCH are better if you need to update data later without re-copying.
  • If both files have the same columns, you can stack the data by copying all rows from the second file and pasting them below the first file's data.
  • Excel's Power Query tool (in Excel 2016 and later) can merge files automatically if they have matching columns, which is faster than manual copying for large datasets.
  • Keeping files separate and using formulas to pull data from one file into another lets you update the source file without re-combining everything.

Combining rows when both files have the same columns

If File A and File B both contain the same type of data — for example, sales records with columns for Date, Product, and Amount — you can stack them by copying all the data from File B and pasting it below File A's last row. Open both files, then select all the data rows in File B (not the header row, since File A already has one). Copy them, switch to File A, click the first empty cell below your data, and paste.

This method works well for files with a few hundred rows. If you're combining files regularly or they're very large, consider using Power Query instead, which can automate the process. To access Power Query in Excel 2016 or later, go to the Data tab, click Get Data, and choose From File, then select the files you want to combine. Power Query will walk you through matching columns and removing duplicates.

Adding new columns from a second file using formulas

If File B contains additional information about items in File A — for example, File A has customer names and File B has their phone numbers — use a formula to pull the data across. The most common formula is VLOOKUP, which searches for a value in one file and returns a matching value from another column.

Open both files and arrange them side by side (use the View tab and select Arrange All). In File A, click the cell where you want the new data. Type a formula like =VLOOKUP(A2,[File B.xlsx]Sheet1!$A$1:$B$100,2,FALSE), replacing the file name, sheet name, and range with your actual file and data. This tells Excel to find the value in cell A2 within File B's data and return the matching value from the second column. Copy this formula down for all rows.

VLOOKUP works when you're searching for an exact match in the first column of your data range. If your data is organized differently, use INDEX/MATCH instead, which is more flexible but requires two formulas nested together. Both formulas create a live link — if you update File B later, the values in File A update automatically.

Merging files with Power Query (Excel 2016 and later)

Power Query is Excel's tool for combining multiple files without manual copying. It's especially useful if you combine files regularly or work with large datasets. Open Excel, go to the Data tab, and click Get Data (or New Query in older versions). Choose From File, then From Folder, and select the folder containing your files.

Power Query will list all the files in that folder. Select the ones you want to combine and click Combine. Excel will ask you to choose which sheet to use from each file and which columns to match. Once you confirm, Power Query stacks all the data into a single table. You can then load this combined data into a new sheet or directly into your existing file.

The advantage of Power Query is that it remembers your settings. If you add new files to the folder later, you can refresh the query and it will automatically include them without re-doing the setup.

Keeping files separate and linking them with formulas

You don't always need to physically combine files. If File A and File B are updated by different people or systems, it's often better to keep them separate and use formulas to pull data from one into the other. This way, when File B is updated, your summary in File A reflects the changes automatically.

To create a link, use a formula that references the other file by name. For example, =SUM([File B.xlsx]Sheet1!A1:A100) will sum a range from File B. Make sure both files are in the same folder and that File B stays in that location — if you move it, the link breaks. If you need to move files later, use the Edit Links option (under Data or File, depending on your Excel version) to update the file path.

Removing duplicates after combining

When you combine two files, you might end up with duplicate rows — the same customer or transaction appearing twice. Excel has a built-in tool to remove them. Select all your data (including headers), go to the Data tab, and click Remove Duplicates. Excel will ask which columns to check for duplicates. If you want to remove rows that are identical across all columns, leave all columns selected. If you only want to check certain columns, uncheck the others.

Be careful: Remove Duplicates deletes the duplicate rows permanently, so make a backup copy of your file first. If you're not sure which rows are duplicates, sort your data first by the column most likely to contain duplicates (like customer ID or email) so you can review them before deleting.

Saving your combined file

Once you've combined your data, save the file with a new name so you don't overwrite your original files. Use File > Save As and give it a clear name like "Combined Sales Data" or "Merged Customer List". Choose the file format — if you're working with formulas that link to other files, keep it as .xlsx (Excel format). If you're sharing the file with someone who uses an older version of Excel, save it as .xls instead, though you may lose some formatting.

If you used Power Query or formulas that reference other files, make sure all the files stay together in the same folder. If someone moves or renames the original files, your combined file won't be able to find them and the links will break.

Frequently Asked Questions

What if the two files have different column headers?

You'll need to rename the columns to match before combining them, or manually map which columns go together. Open both files, compare the headers, and decide which file's naming convention to use. Then edit the headers in one file to match the other before combining. If you're using Power Query, it has a step to rename columns before merging.

Can I combine files if they're in different Excel formats like .xls and .xlsx?

Yes, Excel can read both formats. Open both files, combine them using any of the methods above, and save the result as .xlsx. The older .xls format has some limitations, so converting to .xlsx is usually the better choice unless you need to share with someone using very old Excel software.

What happens to my formulas if I move the combined file to a different folder?

If your combined file contains formulas that link to other files, the links will break when you move it unless you move all the files together and keep them in the same folder structure. Before moving files, use File > Edit Links to see which files your formulas reference, then move all of them together.

Is there a limit to how many files I can combine at once?

Excel itself has no limit on the number of files you can combine, but the size of your final file is limited by your computer's memory. Most computers can handle combining 10 to 20 large files without problems. If you're combining more than that, consider breaking the process into steps — combine five files, then combine those results with another five, and so on.