How to Combine Multiple Workbooks to One Workbook in Excel (6 Ways)

Method 1 – Copy and Paste the Cells Ranges to Combine Multiple Workbooks into One Workbook in Excel

  • Copy the cell ranges that you want to move into the master workbook. You can press Ctrl + C after selecting the cell range or go to the Home tab and click on the Copy command.

Copy and Paste the Cells Ranges to Combine Multiple Workbooks into One Workbook in Excel

  • Click on the plus icon at the bottom of your workbook.

  • Press Ctrl + V to paste the data into the master workbook.

Method 2 – Copy the Worksheets to Combine Multiple Workbooks into One Workbook in Excel

  • Select all the worksheets that you want to move or copy into another master worksheet. You can hold the Ctrl key and manually select all the worksheets using your mouse.
  • Right-click on the selection area and a list will pop up.
  • Choose Move or Copy from the list.

  • The Move or Copy dialog box will appear. Select the workbook where you want to move or copy. This option is available in the To Book drop-down box.
  • Select the position of the copied or moved worksheets in the new workbook under the Before Sheet command text.
  • The selected worksheets are moved into the new workbook by default. If you want to copy them, check the Create a copy check box.
  • Hit the OK button.

Copy the Worksheets to Combine Multiple Workbooks To One Workbook in Excel


Method 3 – Use the INDIRECT Function to Combine Multiple Workbooks into One Workbook in Excel

  • Insert the File Name, Sheet Name, and Cell addresses from where you want to retrieve data in the destination worksheet.
  • Insert the following formula in the destination cell address of the destination workbook:
=INDIRECT("'[" & $B$3 & "]" & $C$3 & "'!" & D3)

$B$3 contains the source Excel file name.

$C$3 holds the worksheet name.

D3 refers to the cell address of the source file from where you want to pull data.

  • Press the Enter key.
  • Drag the Fill Handle icon to the cell ranges where you want to get the data from the source file.

Use the INDIRECT Function to Combine Multiple Workbooks To One Workbook in Excel


Method 4 – Use the CSV File Format to Combine Multiple Workbooks into One Workbook in Excel

  • Save each of the Excel files in CSV file format.
  • Store them all in the same folder.

Use CSV File Format to Combine Multiple Workbooks To One Workbook in Excel

  • Open the Command Prompt.
  • Navigate to the folder where you’ve stored all the CSV files.
  • Enter the following command.
Copy *csv Combined.csv

Here, Combined is an arbitrary file name. You can choose whatever you like.

  • Hit Enter.

  • Open the Combined.csv file.
  • Save as a normal Excel file (.xlsx).

Method 5 – Use PowerQuery to Combine Multiple Workbooks in One Workbook in Excel

  • Store all the Excel files in the same folder to combine them all together.

  • Go to the Data tab from the main ribbon.
  • Choose the Get Data command.
  • Navigate to From File and to From Folder.

Use PowerQuery to Combine Multiple Workbooks To One Workbook in Excel

  • Browse the folder where you stored all the Excel files.
  • Select them all to combine into one master workbook.

Method 6 – Use VBA Code to Combine Multiple Workbooks into One Workbook in Excel

  • Press Alt + F11 to open the VBA editor.
  • Go to Insert and select Module to create a new module.

  • Copy the following VBA code and paste it into the VBA editor.
Sub CombineMultipleFiles()
Dim x, i As Integer
Dim y As FileDialog
Dim m, n As Workbook
Dim z As Worksheet
Set m = Application.ActiveWorkbook
Set y = Application.FileDialog(msoFileDialogFilePicker)
y.AllowMultiSelect = True
x = y.Show
For i = 1 To y.SelectedItems.Count
Workbooks.Open y.SelectedItems(i)
Set n = ActiveWorkbook
For Each z In n.Worksheets
z.Copy after:=m.Sheets(m.Worksheets.Count)
Next z
n.Close
Next i
End Sub
  • Save the code with Ctrl + S.
  • Hit the Run Sub button or press the F5 key to run the code.

Use VBA Code to Combine Multiple Workbooks To One Workbook in Excel

  • You will get prompts to select files. Pick as many Excel files as you want to combine them all together.

Download the Practice Workbook


<< Go Back To Merge Excel File | Merge in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Mrinmoy Roy
Mrinmoy Roy

Mrinmoy Roy, a dedicated professional with a BSc in Electronics and Communication Engineering from Khulna University of Engineering & Technology, Bangladesh, brings over two years of expertise to the ExcelDemy project. As a prolific contributor, he has authored around 180 articles, showcasing his deep knowledge and passion for Microsoft Excel, Data Analysis, and VBA. His unwavering commitment to continuous learning, combined with versatile skills, renders him well-suited for roles in data management and spreadsheet solutions. He has interest... Read Full Bio

2 Comments
  1. What is the best way to combine multiple Excel spreadsheets/pivot tables together? I have 13 spreadsheets and want to create a dashboard to view all the data in one place. Once combined, will I have to refresh the data each time, or can it be dynamically linked so the data is automatically refreshed?

    • Hello BLAKE HUGUENIN. Thank you for your query. I believe the best way to combine multiple spreadsheets and pivot tables is using Power Query. Please follow the below steps:
      Initially, select Data >> Get Data >> From File >> From Excel Workbook Toolbar.

      Now, Get the Import File dialog box and select the required file.

      Then navigator tab will be visible and select the worksheet to copy the sheet in another workbook. Complete the process by clicking on Load and Close.

      Now repeat this process to add sheets as much as you want. Using Power Query is better because if you change the value in any of the workbooks then the value will be changed in master workbook.

       

      Now, if you want to create a dashboard that will be dynamic and change the values of the data if the primary data is changed then use formula =(Sheetname!Range) in the dashboard. For instance =(File4!C5:C13). Please find Add Multiple Worksheets in the master workbook 

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo