Combine Multiple Excel Files into One Workbook with Separate Sheets (4 Methods)

In this example there are three different Excel Files and each of them contain a different Sheet.

Combine Multiple Excel Files into One Workbook with Separate Sheets

Method 1 – Apply Move or Copy Operation to Combine Multiple Excel Files into One Workbook with Separate Sheets

STEPS:

  • Open the second Excel file (Combine Excel files 2).
  • Select the sheet (Sheet2) and right-click on the mouse.
  • Select Move or Copy in the menu.

Apply Move or Copy Operation to Combine Multiple Excel Files into One Workbook with Separate Sheets

  • The Move or Copy dialog box will pop out.
  • Select Combine Excel files.xlsx from To book options and select (move to end) in the field Before sheet.
  • Press OK.

Apply Move or Copy Operation to Combine Multiple Excel Files into One Workbook with Separate Sheets

  • Open the third Excel file (Combine Excel files 3).
  • Select sheet (Sheet3) and right-click on the mouse.
  • Select Move or Copy in the menu.

Apply Move or Copy Operation to Combine Multiple Excel Files into One Workbook with Separate Sheets

  • In the To book field, select Combine Excel files.xlsx, and in the Before sheet, select (move to end).
  • Press OK.

  • The separate sheets are combined in a single workbook.


Method 2 – Combine Multiple Excel Files Into One Workbook with Paste Link Feature

STEPS:

  • Copy cell B2 from Sheet2 in the Combine Excel files 2.

Combine Multiple Excel Files into One Workbook with Paste Link Feature

  • Go to the destination workbook. In this example, the destination is Combine Excel files.
  • Select a cell, B2 here.
  • Select Paste Link from the Paste Options.

Combine Multiple Excel Files into One Workbook with Paste Link Feature

  • A formula will be created as below.

Combine Multiple Excel Files into One Workbook with Paste Link Feature

  • Remove all the ‘$’ signs present in the formula and use the AutoFill tool to complete the series.
  • The source worksheet is returned as below.

  • Repeat the steps for the third Excel file.
  • The sheets have been combined in a single workbook.


Method 3 – Use Power Query to Combine Multiple Files into One Workbook with Separate Sheets

 

STEPS:

  • Open the first workbook (Combine Excel files).
  • Go to Data Get Data From File From Workbook.

Use Power Query to Combine Multiple Files into One Workbook with Separate Sheets

  • The Import Data window will pop out.
  • Select Combine Excel files 2 and press Import.

Use Power Query to Combine Multiple Files into One Workbook with Separate Sheets

  • The Navigator window will pop out.
  • Press Load.

  • Sheet2 from the second workbook is added as a Table.

  • Repeat the process to get Sheet3 from the third workbook.
  • All three sheets are combined in a single workbook.


Method 4 – Excel VBA to Combine Multiple Files into One Workbook with Separate Sheets

 

STEPS:

  • Open the destination workbook. (Combine Excel files).
  • Select Visual Basic from the Developer tab.

Excel VBA to Combine Multiple Files into One Workbook with Separate Sheets

  • Select Module in the Insert tab.

Excel VBA to Combine Multiple Files into One Workbook with Separate Sheets

  • The Module window will pop out.
  • Insert the following code.
Sub CombineFiles()
Dim FilesSelected, i As Integer
Dim tempFile As FileDialog
Dim MainBook, sourceBook As Workbook
Dim Sheet As Worksheet
Set MainBook = Application.ActiveWorkbook
Set tempFile = Application.FileDialog(msoFileDialogFilePicker)
tempFile.AllowMultiSelect = True
FilesSelected = tempFile.Show
For i = 1 To tempFile.SelectedItems.Count
Workbooks.Open tempFile.SelectedItems(i)
Set sourceBook = ActiveWorkbook
For Each Sheet In sourceBook.Worksheets
    Sheet.Copy after:=MainBook.Sheets(MainBook.Worksheets.Count)
Next Sheet
    sourceBook.Close
Next i
End Sub

Excel VBA to Combine Multiple Files into One Workbook with Separate Sheets

  • Close the Visual Basic window.
  • Under the Developer tab, select Macros.

Excel VBA to Combine Multiple Files into One Workbook with Separate Sheets

  • The Macro dialog box will pop out.
  • Select CombineFiles in the Macro name.
  • Press Run.

  • A Browse window will pop out.
  • Select the files you want to combine and press OK.

  • The sheets have been combined into a single workbook.


Download Practice Workbook

 


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

Get FREE Advanced Excel Exercises with Solutions!
Aung Shine
Aung Shine

Aung Shine completed his bachelor’s in Electrical and Electronics Engineering from Bangladesh University of Engineering and Technology. It has been almost 2 years since he joined SOFTEKO and actively working on the ExcelDemy project. Currently he works as a Team Leader where he guides his team members to create technical content. He has published 150+ articles and reviewed 50+ articles. He has also solved various user problems before. He has interests in Data Analysis, Power Query, Advanced Excel,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo