How to merge multiple CSV files into one, without copy and paste
Sales reports, bank statements and system exports often come split up: one file per month, per branch, per store or per sales rep. To analyze the whole period you need everything in a single table. Copying and pasting works for two or three small files, but problems show up quickly.
The most common mistakes when merging by hand
- Repeated headers: the title row of each file ends up in the middle of the data and breaks filters and pivot tables.
- Columns out of order: an updated system starts exporting "Customer, Date, Amount" instead of "Date, Amount, Customer", and one month's data lands in the wrong columns.
- Extra or missing columns: one file has a new column the others do not.
- Different delimiters: some files use commas and others use semicolons.
- Broken characters: files from different sources with different encodings.
Option 1: in Excel itself, with Power Query
If all the files are in one folder, Excel can combine them through Data › Get Data › From File › From Folder and then "Combine & Transform". It is powerful, but it has a learning curve and expects every file to share the same structure; column differences have to be handled in the query editor.
Option 2: with the Merge CSV tool
Merge CSV solves the problems above in one step. Drag in all the files, keep the header option on and click merge:
- The header appears only once in the final file.
- Columns are matched by name, so a different order between files does not matter.
- Columns that exist only in some files are kept, with empty cells for the others.
- Each file's delimiter is detected automatically, and you choose the one for the output.
- An optional column shows which file each row came from, handy for knowing the month or branch.
The result is saved as UTF-8, which Excel opens with special characters intact, and values are not changed: leading zeros and dates stay exactly as they were.
Check the result
After merging, compare the row count: it should equal the sum of the data rows in each file. If the files shared records, such as the same customer exported in two months, run Remove Duplicate Rows next and choose the column that identifies each record. And if the final file becomes too big for Excel, the reverse also exists: split the CSV into parts.
Frequently asked questions
No. With the header option on, each column is matched by name, wherever it sits in each file.
Turn the header option off: rows are stacked in the order they appear, with no matching by name.
There is no fixed limit. The practical limit is your computer memory, since everything is processed in the browser.