Excel Tutorial: How To Combine Excel Files Into One


Combining Excel files can be a valuable time-saving task, especially for professionals who work with large volumes of data. Whether you're compiling data from multiple sources or simply organizing information for analysis, knowing how to combine Excel files into one can make your work more efficient and streamlined. In this tutorial, we will provide a step-by-step guide on how to merge Excel files, so you can easily manage and analyze your data.

Key Takeaways

  • Combining Excel files can save time and streamline data management for professionals working with large volumes of data.
  • Preparation of the Excel files, including consistent column headers and formatting checks, is important before merging.
  • There are different methods for combining Excel files, including the "Consolidate" function, Power Query, and VBA scripting.
  • After combining the Excel files, it is crucial to review the merged file for any errors or discrepancies and make necessary adjustments.
  • Exploring and practicing the different options for combining Excel files can help individuals find the best fit for their specific needs.

Preparing the Excel files

Before combining multiple Excel files into one, it's important to ensure that the files are consistent and free from any formatting issues or discrepancies. Here are a few key steps to take in preparation:

Ensuring the files have consistent column headers

  • Check that the column headers in all the Excel files are consistent and match each other. This will ensure that the data can be easily merged without any confusion.
  • If necessary, rename the column headers in the files to make them consistent across all the files. This will streamline the process of combining the data.

Checking for any formatting issues or discrepancies

  • Inspect the formatting of the data in each Excel file to ensure that it is consistent throughout. Look for issues such as different date formats, number formats, or text formatting.
  • Address any discrepancies in formatting by standardizing the data across all the files. This will prevent any issues when combining the files into one.

Using the "Consolidate" function in Excel

Excel provides a powerful tool called the "Consolidate" function that allows users to combine data from multiple excel files into one. This feature is particularly useful when working with large datasets or when merging information from different sources. In this tutorial, we will explore how to access the "Consolidate" option in Excel and how to create a consolidation of multiple excel files.

Accessing the "Consolidate" option in Excel

To access the "Consolidate" function in Excel, users can follow these steps:

  • Step 1: Open Microsoft Excel and select the workbook where you want to consolidate the data.
  • Step 2: Click on the "Data" tab in the top menu bar.
  • Step 3: Look for the "Consolidate" option in the "Data Tools" group.
  • Step 4: Click on "Consolidate" to open the consolidation dialog box.

Selecting the source data and creating the consolidation

Once the "Consolidate" dialog box is open, users can follow these steps to select the source data and create the consolidation:

  • Step 1: In the "Function" dropdown menu, choose the type of calculation you want to apply to the consolidated data (e.g., sum, average, count, etc.).
  • Step 2: Click on the "Reference" button and select the range of cells from the different excel files that you want to consolidate.
  • Step 3: If the data is located in different workbooks, users can click on the "Browse" button to select the additional files.
  • Step 4: Once all the source data is selected, users can choose to create links to the source data or copy the data to the new location.
  • Step 5: Click "OK" to create the consolidation based on the selected options.

By following these steps, users can effectively combine data from multiple excel files into one using the "Consolidate" function in Excel.

Using Power Query to combine files

When working with multiple excel files, you can use Power Query to easily combine them into one. Power Query is a powerful tool in Excel that allows you to import and merge data from various sources, including multiple excel files. Here's how to do it:

A. Importing multiple files into Power Query

The first step is to import the excel files into Power Query. To do this, go to the Data tab in Excel and select "Get Data" > "From File" > "From Folder". This will open a window where you can select the folder containing the excel files you want to combine.

  • Select the folder: Choose the folder containing the excel files you want to combine.
  • Import the files: Power Query will import all the files in the selected folder.

B. Merging the files in Power Query

Once the files are imported into Power Query, you can merge them into one single table. Here's how to do it:

  • Select the files: Click on the "Combine" button in Power Query and choose "Combine & Load". This will open a window where you can select the files you want to merge.
  • Choose the columns: Power Query will display a preview of the data in the selected files. You can choose which columns you want to include in the merged table.
  • Load the merged data: Once you have selected the columns, click "OK" to merge the files into one table and load it into Excel.

Using Power Query to combine multiple excel files is a quick and efficient way to merge data from different sources into one single table. This can save you time and effort when working with large volumes of data.

Using VBA to merge files

When it comes to combining multiple Excel files into one, using VBA (Visual Basic for Applications) can be a powerful and efficient solution. With VBA, you can automate the process of merging files, saving you time and effort. Here's how you can use VBA to merge Excel files:

A. Writing a VBA script to automate the merging process
  • Open the Visual Basic for Applications editor

    To begin, open the Excel workbook in which you want to merge the files. Then, press Alt + F11 to open the VBA editor.

  • Write the VBA script

    Next, create a new module in the VBA editor and write the script to automate the merging process. This script should include commands to open each file, copy the data, and paste it into the main workbook.

  • Test and debug the script

    Once you have written the VBA script, it's important to test it thoroughly and debug any errors. This may involve running the script with sample files and making adjustments as needed.

B. Running the VBA script to combine the files
  • Run the VBA script

    After you have successfully written and tested the VBA script, you can run it to merge the Excel files. This can typically be done by pressing F5 in the VBA editor to execute the script.

  • Review the merged data

    Once the script has completed running, review the merged data in the main workbook to ensure that all the files have been combined accurately.

Reviewing the combined excel file

After successfully combining multiple excel files into one, it is essential to review the file to ensure accuracy and completeness. Follow these steps to review the combined excel file:

A. Checking for any errors or discrepancies
  • Review all the data: Go through each sheet and column to check for any errors or discrepancies in the combined file.
  • Verify formulas: Check all formulas to ensure they are referencing the correct cells and ranges in the combined file.
  • Validate data: Use data validation tools to ensure that the data in the combined file meets the specified criteria and is error-free.

B. Making any necessary adjustments or corrections
  • Correcting errors: If any errors or discrepancies are found, make the necessary adjustments to ensure the accuracy of the combined file.
  • Reconciling data: Compare the combined file with the original files to ensure that all data has been accurately merged and no information is missing.
  • Formatting consistency: Check for consistent formatting across all sheets and columns in the combined file for a professional and organized look.


There are various methods for combining excel files, including using the copy and paste feature, the power query tool, and the consolidation function. As you continue to work with excel files, practice and explore these different options to find the best fit for your individual needs. The more familiar you become with these methods, the more efficient and effective you will be in managing your excel data.

Excel Dashboard

ONLY $99

    Immediate Download

    MAC & PC Compatible

    Free Email Support

Related aticles