Consolidate Multiple Excel Files into One Workbook

How-to basics · Updated November 3, 2026

Consolidate Multiple Excel Files into One Workbook

Yes. In Excel for Microsoft 365 on Windows, the most repeatable way to consolidate several similarly structured files is Power Query: put the source files in one folder, choose Data > Get Data > From File > From Folder, then combine and load the data. For a one-time job, copying sheets or using Data > Consolidate may be quicker, depending on whether you want to stack records or summarize matching ranges.

Choose the right kind of consolidation

“Consolidate” can mean several different things. Before combining files, decide what the finished workbook should contain. The two most common goals are to append rows into one long table or to calculate a summary from several ranges. These are different operations, and choosing the wrong one can produce a workbook that looks combined but answers the wrong question.

  • Append records: Put the rows from each file underneath the rows from the previous file. This suits monthly sales transactions, survey responses, inventory lists, or attendance logs. Power Query is usually the best choice when the process will be repeated.
  • Summarize matching ranges: Add, average, count, or otherwise aggregate corresponding cells from several sheets or workbooks. Excel’s Consolidate command is designed for this kind of calculation.
  • Combine worksheets as separate tabs: Keep each source sheet intact in a single workbook. Copying or moving sheets may be appropriate if the files have different layouts or need to remain separate.

For example, if April.xlsx and May.xlsx each contain a table of individual sales, appending creates one transaction list. If each file instead contains the same department-by-month summary grid and you want the totals combined, use a summary approach. A single “combine files” button cannot make that choice for you.

Prepare the source files

A little preparation prevents many import problems. For files that will be appended, use the same column names and meanings in every workbook. A heading such as “Customer ID” in one file and “Client Number” in another may be treated as two separate columns, even if the values mean the same thing. Standardize spelling, spacing, and date or number conventions before combining.

  • Put one header row at the top of each data range, with no merged heading cells.
  • Keep each field in its own column and avoid blank rows inside the records.
  • Use consistent data types: dates should be dates, quantities should be numbers, and identifiers should remain text if leading zeroes matter.
  • Remove totals and notes from the middle of the data. Keep summaries outside the table or on a separate sheet.
  • Save source files in a dedicated folder so unrelated workbooks are not imported by accident.

Excel Tables make the source layout easier to manage. Select the data and choose Insert > Table, confirming that the table has headers. A table expands as new rows are added. For a folder-based Power Query process, however, the important requirement is that the files have compatible structures; the query may be set up to read a sheet or table, so check which object it is using.

Combine files with Power Query

Power Query is Excel’s built-in tool for importing, shaping, and combining data. It is especially useful when the same task recurs: instead of copying rows every month, you can add a new file to the source folder and refresh the query. These steps describe Excel for Microsoft 365 on Windows.

  1. Place the workbooks to combine in one folder. Keep the output workbook outside that folder to reduce the risk of importing the finished file into its own source.
  2. Open a new or existing destination workbook and select Data > Get Data > From File > From Folder.
  3. Browse to the folder and select Open. Review the file list. If it includes temporary files, unrelated workbooks, or files that should be excluded, filter them out before combining.
  4. Choose Combine & Transform Data. In the combine dialog, select the sheet or table containing the records and confirm the preview.
  5. In the Power Query Editor, check the column names, remove unwanted columns or rows, and verify data types. Then choose Home > Close & Load to place the result in Excel.

The resulting query typically appends the records into one table. The original files remain separate; Power Query reads them and produces a combined result rather than merging the workbooks into one editable source file. To update the result after adding or changing source files, select Data > Refresh All. Refresh is a deliberate update unless you configure the workbook’s connection properties for a different refresh behavior.

Excel for Mac has Power Query capabilities, but available connectors and interface details can differ by version and build. If the From Folder option is not available in your Mac edition, use a supported import route in that version or combine the files in Excel for Windows. Excel for the web also does not provide the same full Power Query authoring experience as desktop Excel.

When copying sheets is simpler

If you only need to bring a few unrelated worksheets together once, copying sheets can be the most direct method. Open both workbooks, right-click the source sheet tab, choose Move or Copy, select the destination workbook in the “To book” list, and select Create a copy if you want to retain the original sheet. Repeat for other sheets, then save the destination workbook.

This method preserves each sheet as a separate tab rather than stacking its records into one table. Check formulas, named ranges, charts, and links after moving sheets: formulas may still refer to the original workbook, and copied sheets can bring along dependencies you did not intend. If the files have identically structured records that should be filtered or analyzed together, Power Query generally creates a cleaner result.

Use Data Consolidate for summaries

Excel’s Consolidate command combines values from multiple ranges by applying a function such as Sum, Count, or Average. It is useful when ranges represent the same categories, such as each branch’s product totals, and you want one summary. In Excel for Microsoft 365 on Windows, choose Data > Consolidate, select a function, add each source range under Reference, and choose Add. Select Top row or Left column if the ranges contain matching labels; select Create links to source data if you want linked detail rows in the result. Choose OK to create the consolidation.

This feature is not a general-purpose file-stacking tool. It combines matching positions or labels into an aggregate, so it will not preserve every transaction as a distinct record. For example, if three worksheets contain sales totals for the same product categories, Sum can produce a combined category total. If they contain individual orders, use Power Query instead. When source ranges have inconsistent labels or layouts, review the references carefully because Excel cannot infer every intended match.

Use a formula for a small, fixed set

For a small number of worksheets with identical columns, a dynamic array formula can stack ranges without importing files. VSTACK is available in Microsoft 365 and Excel 2024. With headers in A1:D1 on both sheets, January records in A2:D20, and February records in A2:D15, enter this formula in an empty cell on the destination sheet:

=VSTACK(January!A1:D20,February!A2:D15)

The first range contributes the header and 19 January records; the second contributes 14 February records without repeating its header. The spilled result is 34 rows: one header plus 33 records. Make sure the cells below and to the right of the formula are empty so the result can spill. Add another range to the formula for each additional sheet.

This is convenient for a fixed workbook, but it is less suitable for a changing collection of separate files. You must update the formula when sheets or ranges change, and a formula does not provide Power Query’s import and cleanup steps. VSTACK is not available in older Excel versions; a formula returning a spill error may also indicate that the destination area is blocked.

Check the combined result

Do not assume that a successful import means the data is correct. Compare the combined row count with the expected total, inspect records from the beginning and end of each source file, and look for blank or unexpected columns. If one file uses a different heading, Power Query may create a separate column rather than placing those values under the intended field.

  • Dates and numbers: Check that dates sort chronologically and that quantities can be summed. A number stored as text may look correct but behave differently in calculations.
  • Identifiers: Preserve leading zeroes in codes such as 00481. If Excel interprets them as numbers, the zeros can disappear.
  • Duplicates: Decide whether repeated records are valid. Remove duplicates only when you have a reliable key or a clear rule for identifying a duplicate.
  • Totals: Exclude pre-existing subtotal or grand-total rows before appending, or totals can be counted again alongside the underlying transactions.

For a useful audit trail, keep the source files unchanged and consider adding a source filename column in Power Query. That makes it possible to trace an unexpected row back to the workbook it came from. Save the destination under a new name and document the folder location and refresh steps for anyone who will maintain it.

Common problems and practical safeguards

A frequent issue is importing the wrong content because workbooks contain several sheets or tables. Confirm the sample sheet or table selected during setup, and verify that the preview shows actual records rather than a cover page or summary. Another issue is inconsistent file structure: a new monthly workbook may add a column, rename a heading, or move the data to a different sheet. Power Query can often accommodate added fields, but changes to the selected source object or headers may require editing the query.

Folder queries can also pick up files that were not intended as data, including prior exports or temporary copies. Keep the folder dedicated to source files and use the file-list filters to include only the needed names or file types. Do not put the output workbook among the inputs. Before sharing the result, review whether it contains confidential records and whether the recipients should receive the source files or only the consolidated output. Refreshing a query can bring in newly added source data, so access to the source folder matters as well as access to the finished workbook.

Frequently Asked Questions

Can I combine multiple Excel files into one sheet?
Yes. If the files contain compatible records, use Data > Get Data > From File > From Folder and combine them with Power Query. The result can be loaded as one table on a worksheet.

Will Power Query update when I add another file?
It can include files added to the source folder when you refresh the query, provided the new file matches the expected structure and passes any filters. Use Data > Refresh All to run the refresh manually.

Does combining files delete or change the originals?
No. Power Query reads the source files and loads a result into the destination workbook. Keep the originals if you need them for auditing or later refreshes.

Can Excel combine files with different columns?
It may combine them, but columns with different headings can remain separate, and missing values will be blank. Standardize equivalent headings first and inspect the result for fields that did not line up.

What is the difference between Append and Consolidate?
Appending stacks rows and preserves individual records. Data > Consolidate applies a function, such as Sum, to aggregate matching ranges. Use the first for transaction lists and the second for summary calculations.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.