How to merge multiple Excel CSV files into one

Merging multiple Excel files into one and multiple CSV files into one only takes a minute once you get the hang of the steps in this article. Lucid Gen has separate instructions for each operating system (Windows and macOS). On top of that, I’ve added a bonus trick to help you total your numbers by row and column labels. Let’s get started!

Merge multiple Excel files into one

Follow the steps below to merge multiple Excel or CSV files into one. This method only works on Windows computers.

Step 1: Put all the Excel or CSV files into one folder like this. Remember that the folder must not contain any other types of files.

Put all Excel or CSV files that need to be merged into one folder
Put all Excel or CSV files that need to be merged into one folder

Step 2: Open Excel and click through the following.

Data > Get Data > From File > From Folder

Note: The screenshots below were taken in Excel 2016, where this menu was still called Data > New Query. In Excel for Microsoft 365 (10/2026), it is Data > Get Data, and the remaining steps are the same.

Import data with From Folder
Import data with From Folder

Step 3: Click Browse… and select the folder containing the Excel or CSV files you want to merge.

Click Browse... and select the folder containing the Excel or CSV files to merge
Click Browse… and select the folder containing the Excel or CSV files to merge

Step 4: Click Combine & Load.

Click Combine & Load
Click Combine & Load

Step 5: Click OK to merge multiple Excel files into one.

Click OK to merge multiple Excel files into one
Click OK to merge multiple Excel files into one

Here is the result after merging. Just close the Workbook panel on the right and delete the extra column (column A), and you’re done.

Result after merging Excel files
Result after merging Excel files
Video tutorial for merging multiple Excel files into one

How to fix merge errors caused by hidden files in the folder:

As I mentioned in step 1, the folder must not contain any other files, or you’ll run into errors. If your folder has hidden files, you can fix it in 2 ways:

  1. Create a new folder and copy the files into it.
  2. Turn on the option to show hidden files as shown below, then delete the hidden files.

In the folder’s menu, click View and select Options.

Click View and select Options
Click View and select Options

When the Folder Options window appears, click the View tab, turn on Show hidden files, folders, and drives, then click Apply and OK.

Turn on Show hidden files, folders, and drives
Turn on Show hidden files, folders, and drives

Merge multiple CSV files into one on Mac

On Mac (macOS), this method only works for CSV files, not XLSX files. To merge CSV files, follow these steps:

Step 1: Put all the CSV files into one folder, then click the gear (Action) button in Finder and select Copy “folder name” as Pathname.

Click the gear button and select Copy "folder name" as Pathname
Click the gear button and select Copy “folder name” as Pathname

Step 2: Press Command + Space, then search for and open the built-in Terminal app.

Step 3: Type the command below into Terminal.

pwd
Type pwd into Terminal
Type pwd into Terminal

Step 4: Type cd and paste the folder path you copied in step 1.

cd [Path of the folder containing the files, copied earlier]
Type cd followed by the path of the folder containing the CSV files
Type cd followed by the path of the folder containing the CSV files

Step 5: Enter the command below into Terminal to merge the CSV files into one. You can rename lucidgen.csv to anything you like, such as yourname.csv.

cat *.csv >lucidgen.csv
Type the command to merge multiple CSV files into one
Type the command to merge multiple CSV files into one

Looks pretty pro, just like an IT person, right? A few commands and your CSV files are merged.

The merged CSV file will be in the same folder
The merged CSV file will be in the same folder

How to remove the extra header rows after merging:

Since this method merges the entire contents of each file, the header row of every file is kept. You can remove the extra header rows like this.

First, select the columns and apply a Filter (Data > Filter). Then click the Filter button on any column. It’s the small down-arrow button I circled in the image below.

Select the columns, then apply a Filter (Data > Filter)
Select the columns, then apply a Filter (Data > Filter)

When the Filter window appears, filter to show only the extra header rows, select them all by dragging along the row numbers, then right-click and delete them.

Filter the extra header rows and delete them
Filter the extra header rows and delete them

Here is the final, clean result of merging multiple CSV files on Mac.

Final result after merging CSV files on Mac
Final result after merging CSV files on Mac

Merge Excel and CSV files online

If you want something even simpler, you can use online tools to merge Excel and CSV files. However, if your files contain non-English text such as Vietnamese, the characters can easily get garbled.

  • Merge Excel files online: Link
  • Merge CSV files online: Link

These online tools all work the same way and only differ in their website interface, so I won’t go through them with screenshots. Just upload your files, wait for the merge to finish, then download the result.

How to combine data by column (extra bonus)

This is just a bonus, but I think some of you will need it. In this case, I run Facebook ads on multiple accounts and want to see the total numbers for each day.

For example: on 10/06/2020, 5 accounts were running Facebook ads, so I exported 5 files that all contain 10/06/2020. Now I need to add up the numbers from all 5 accounts for that day.

Step 1: After merging the Excel or CSV files, click an empty cell where the summary table should go (I chose G1), then click Data and select Consolidate.

Click Data and select Consolidate
Click Data and select Consolidate

Step 2: Tick Top row and Left column to combine by the labels at the top and on the left. In the Reference box, select the entire data range, including the headers.

Tick the 2 label options and drag to select the data range
Tick the 2 label options and drag to select the data range

Step 3: The date column won’t display in the right format, so you need to format it as Short Date.

Reformat the date column
Reformat the date column

That’s it, no more typing formulas or adding up cells one by one.

Data totaled by label
Data totaled by label

Final thoughts

Whatever field you work in, if you deal with report data, I hope this article helps you a lot. We covered merging multiple Excel files into one, merging multiple CSV files into one, merging Excel and CSV files online, plus a bonus guide to totaling data by label. Did it solve your Excel problem? Feel free to ask questions in the comments below!

Hieu Tran Ngoc Minh

Hieu (born in 1996) holds a Bachelor's degree in Business Administration from Saigon Technology University. Currently a Data Analyst at Ninja Van, Hieu has extensive experience in Data Analysis and Digital Marketing. This blog is where Hieu shares practical experiences from work and life.

4 Comments

  1. Cám ơn b, Trần Ngọc Minh Hiếu. Vì máy của mình không có phần New Query nên mình không làm Offline được. Cám ơn b nhiều nhé!

    Reply
  2. Cách hợp nhất Online chỉ cho phép ghép tối đa 10 file thôi hả add. Có cách nào hợp nhất nhiều file hơn kg b? Chỉ giúp mình với nhé. Cám ơn b.

    Reply
    • Chào Thoa, mấy trang online người ta làm vậy để không bị mất quá nhiều dung lượng tạm thời cho mỗi người dùng đó. Muốn gộp thật nhiều file thì tốt nhất nên làm Offline. Còn online bạn phải mất công làm nhiều lần thôi à.

Leave a Comment

Feel free to leave your comment (preferably in English), and we will review and respond as soon as possible. Please use a real email to ensure your comment is approved and to receive notifications when we reply. You can also add an avatar to your email.