DATA CLEANUP & ERROR CHECKS
How to Combine Monthly Files with Power Query
Combine same-structure monthly Excel files into one refreshable table. This guide shows exactly what to prepare, where to click, what to check, and how to add next month’s file without rebuilding the query.

What you are building
Power Query can take repeated files from one controlled folder, apply the same cleanup steps to each file, append the rows, and load one result into Excel. The key is consistency: the files need the same useful columns, the folder must not contain unrelated workbooks, and the query must be tested before you rely on it.
If your source files already contain mixed dates, numbers, and text, first review how to find inconsistent data types in an Excel column. Fixing obvious source problems early makes the folder query easier to troubleshoot.
Step 1: Prepare one controlled folder
Create a dedicated folder for this process, such as Monthly Files. Put only the files that belong in the combined result inside it. For this example, the folder contains January.xlsx, February.xlsx, and March.xlsx.
- Make a backup of the source workbooks.
- Confirm that each file uses the same header names, such as Date, Category, Amount, and Notes.
- Remove temporary exports, old copies, personal backups, and unrelated workbooks from the folder.
- Keep the file type consistent when possible. Combining Excel workbooks is easier to maintain than mixing Excel, CSV, and backup formats in one folder.

Step 2: Open the folder connector
Open a blank workbook or the workbook where you want the consolidated table to live. Then use the Excel ribbon:
- Open the Data tab.
- Select Get Data.
- Choose From File.
- Select From Folder.
Excel will ask you to choose the folder. Select the controlled Monthly Files folder, then confirm. Do not choose an individual January or February workbook; the folder is the source that makes future refreshes possible.

Step 3: Filter the file list and choose the right combine action
Power Query first shows the files it found. Treat this list as a safety check, not a screen to skip.
- Check the Name and Extension columns.
- Filter out any file that is not part of the monthly series.
- Exclude hidden, temporary, or backup files. A file such as ~$January.xlsx or March backup.xlsx should not be included.
- Choose Combine and Transform Data, not a direct combine that skips your chance to inspect the sample transformation.
The combine dialog uses one representative file as the sample. That sample determines the transformation steps that Power Query applies to the other files, so choose a normal monthly workbook with the expected headers and data types.

Step 4: Inspect the sample-file transformation
Power Query opens an editor showing the sample file and the steps applied to it. Do not load immediately. First, confirm that the transformation creates the structure you want every month.
- Check that the first real row was promoted to column headers.
- Check that dates are typed as dates, amounts are numeric, and text fields remain text.
- Remove blank rows, report titles, and repeated footer rows if they exist.
- Look down the Applied Steps list. Each step should have a clear purpose and should work for every monthly file.
- Preview several rows and confirm that the values still belong to the correct columns.
If one month uses a different header, fix the source file or create a deliberate transformation rule. Do not quietly accept a column that becomes blank for one month. If you need a macro-based alternative for a different workflow, compare it with this VBA workbook-combining tutorial.

Step 5: Load one consolidated table and keep Source File lineage
When the preview is correct, choose Close & Load or Close & Load To. For a practical reporting workflow, load the result to an Excel Table on a new worksheet unless you have a specific reason to use the Data Model.
- Choose the destination that fits your workbook.
- Confirm that the output contains one row per source record.
- Keep the Source File or Source.Name column.
- Sort or filter the result to inspect more than the first few rows.
The source-file column is not clutter. It is your audit trail. If a total looks wrong, it lets you identify the month and workbook that supplied the row. Do not manually correct the loaded table as a permanent fix; manual edits are replaced the next time the query refreshes.

Step 6: Add next month’s file and refresh
Once the query works, the next month should be simple. Save the new workbook using the same structure and place it in the same folder.
- Copy April.xlsx into the Monthly Files folder.
- Open the workbook containing the query result.
- Refresh the query from Data → Refresh All, or right-click the output table and choose Refresh.
- Confirm that April rows appear exactly once.
- Filter the Source File column to confirm the new rows came from April.xlsx.
- Reconcile the April total against the source workbook.
If you remove a test file, refresh again and confirm that its rows disappear. This tests both directions of the workflow before real reporting begins.

Common mistakes and how to fix them
| Symptom | Likely cause | Fix |
|---|---|---|
| Rows are duplicated | The folder contains copies or overlapping exports. | Filter the folder and remove duplicate source files. |
| A column is blank for one month | A header changed or the sample structure does not match. | Standardize the header or add a deliberate transformation step. |
| Amounts are treated as text | The sample file contains text values or inconsistent number formats. | Set the data type in Power Query and check the source values. |
| Manual fixes disappear | The loaded result is regenerated on refresh. | Fix the transformation inside Power Query instead of editing the output table. |
| Refresh fails after a move | The query points to a path the workbook cannot access. | Recheck the folder source and confirm the same user has access. |
Final verification before you rely on the result
Run these checks after the first build and after any structural change. A query that refreshes without an error can still return the wrong rows, so verify the numbers as well as the mechanics.
- Compare the combined row count with the expected total across the monthly files.
- Reconcile at least one control total per month.
- Filter Source File and confirm every included workbook appears as expected.
- Add one test file, refresh, and verify new rows appear once.
- Remove the test file, refresh again, and verify its rows disappear.
- Check for error rows, unexpected blanks, changed headers, and unrelated backups.

Frequently asked questions
Do the files need identical formatting?
They need a consistent data structure. Cosmetic formatting can differ, but the columns and the meaning of the values should remain consistent.
Can I combine CSV and Excel files together?
It is possible, but keeping one source type per workflow is usually easier to test and maintain. If you mix types, verify the sample transformation carefully.
Why did Power Query import a backup file?
The folder connector imports files that match its filtering rules. Move backups out of the folder or filter them out before the combine step.
Can I use this on Mac Excel?
Power Query capabilities vary by Excel version and platform. Test the specific Mac installation, especially the folder connector, refresh behavior, and destination options.
Should I delete the Source File column?
Keep it until the workflow is trusted. It is one of the fastest ways to trace an unexpected row back to its source workbook.
Continue building reliable Excel workflows
Browse more lessons in the OneXcel Tutorial Hub or explore free Excel resources.
