Guide
How to merge CSV files in Excel
Got a folder of monthly CSVs? Excel can combine them into one table, and refresh it when you add next month’s file.
This works for any CSVs with the same columns. For bank statements specifically, there is a shortcut: add the PDF statements to “Several statements” in the converter and download one combined CSV that is already checked for gaps, duplicates and overlaps. See combining bank statements.
Step by step
- Put the CSVs in one folderOnly the files you want to combine, all with the same column headings.
- Get data from the folderIn Excel, go to Data, Get Data, From File, From Folder, and choose the folder.
- CombineClick Combine, then Combine & Transform Data. Excel uses the first file as a sample of the layout.
- Check the columnsIn Power Query, check dates are dates (use Change Type, Using Locale, English (United Kingdom) if not) and amounts are numbers. The Source.Name column shows which file each row came from.
- LoadClick Close & Load. All rows appear in one table.
- Refresh next monthDrop the new CSV in the folder and click Data, Refresh All.
The duplicates problem
Power Query combines everything in the folder. If the same statement was saved twice, or an interim statement overlaps two monthly ones, those transactions are combined twice. Removing duplicate rows doesn’t fix it safely: two genuine identical transactions on the same day would be removed too. Check the set first, or use the converter’s combined CSV, which removes repeated statements and overlaps while keeping genuine repeats.
Keep the file name
Don’t delete the Source.Name column. When a figure is questioned later, it tells you which CSV, and so which statement, a row came from. Rename it to “Source file” if you like.
If the folder also contains files you don’t want, such as a notes file or an older export, filter the Extension or Name column in Power Query to leave them out before combining.
Sort after combining
Power Query combines files in the order it finds them, usually alphabetical by file name. Sort the combined table by date before you rely on any running balance.
Questions people ask
Can I merge CSVs with different columns?
Power Query will combine them but leave gaps. Make the headings match first.
Should I use Remove Duplicates?
Be careful: it removes genuine identical transactions as well as repeated ones.
Does this work on a Mac?
Recent versions of Excel for Mac include Power Query with From Folder; older versions may not.