How To Merge Multiple Sheets With Same Headers in Excel
How To Merge Multiple Sheets With Same Headers in Excel
Excel?
extendoffice.com/documents/excel/3252-excel-merge-excel-files-same-header.html
For example, you have some data with the same headers in different sheets as below
screenshots shown, and now your job is to merge these sheets into one sheet. Instead of
copying and pasting them one by one, this tutorial introduces the better ways for you to
handle this job.
Merge or consolidate excel sheets with same headers by Kutools for Excel
To combinne multiples sheets or workbooks into one sheet or workbook may be edious in Excel, but
with the Combine function in Kutools for Excel, you can combine merge dozens of sheets/workbooks
into one sheet or workbook, also, you can consolidate the sheets into one by several clicks only. Click
for 60 days free trial!
1/15
Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days.
1. Activate the workbook you want to merge the sheets, press Alt + F11 keys to open
Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and then paste below VBA code to the new Module window.
2/15
1 Sub Combine()
2 Dim i As Integer
6 LInput:
11 GoTo LInput
12 End If
16 For i = 2 To Worksheets.Count
3. Press F5 key to run the VBA, and a dialog pops out for you to enter the number of the
title rows. See screenshot:
3/15
Tip:
(1.) Your data must start from A1, if not, the code will not take effect.
4/15
(2.) Your data must have the same structure.
(3.) This code only can combine all worksheets of the active workbook, if you want to
merge worksheets from multiple workbooks, this code will not work.
You may be familiar to view multiple webpages in Firefox/Chrome/IE, and switch between them by
clicking corresponding tabs easily. Here, Office Tab supports similar processing, which allow you to
browse multiple Word documents or Excel workbooks in one Word window or Excel window, and easily
switch between them by clicking their tabs.
Click for free trial of Office Tab!
Supposing you have some data with same column and row headers as below screenshot
shown, and you want to merge excel sheets with same headers and then do some
calculations, you can apply the Consolidate function in Excel.
>
1. Open all the workbooks you
want to merge sheets from, and
place the cursor at a blank cell
where you want to locate the
merging data, then click Data >
Consolidate. See screenshot:
5/15
2. Then in the Consolidate window, do as below operation:
3) Click Add button to add the range into All reference list. To repeat 2) step and 3) steps to
add all ranges needed to merged into this list.
4) Check Top row and Left column under Use labels in section.
5) If you want to link the merged data to source data, check Create links to source data .
6/15
1) Select the calculation you want form Function list;
3) Click Add button to add the range into All reference list. To repeat 2) step and 3) steps to
add all ranges needed to merged into this list.
4) Check Top row and Left column under Use labels in section.
5) If you want to link the merged data to source data, check Create links to source data .
3. Click OK. Now all the data range with same headers are merged into one and sum up by
headers.
7/15
8/15
Merge or consolidate excel sheets with same headers by Kutools for Excel
If in some cases, you want to merge data with same headers only, and in other cases, you
want to merge data and consolidate them, are there any tricks can solve both these tasks?
Here I introduce Kutools for Excel’s powerful Combine function for you.
1. Click Enterprise > Combine to enable the Combine wizard, and then check Combine
multiple worksheets from workbooks into one worksheet. See screenshots:
9/15
2. Click Next> > to go to Combine Worksheets - Step 2 of 3 wizard, and do as below:
1) Click Add > File/Folder to add the workbooks you may merge sheets from to the
Workbook list;
2) Check the workbook name you want to merge the sheets, you can choose multiple
workbooks;
3) Check the worksheets you want to combine together;
4) Click to select the range you want to combine, if the ranges are placed in the
same location of each sheet, just need to select one range from a sheet then click Same
range.
3. Click Next>> to the Combine Worksheet – Step 3 of 3 wizard, and type 1 into the textbox
of Title row number, if there are no title in your range, type 0 into it.
10/15
4. Click Finish, and a dialog pops out to remind you save this scenario, if you want to save
it, click Yes, or No.
11/15
1. Click Enterprise > Combine to display the Combine wizard, and check Consolidate and
calculate values across multiple workbooks into one worksheet. See screenshot:
2. Click Next> > to go to the Combine Worksheets - Step 2 of 3 wizard, and do as below:
1) Click Add > File/Folder to add the workbooks you may merge sheets from to the
Workbook list;
2) Check the workbook name you want to merge the sheets, you can choose multiple
workbooks;
12/15
3) Check the worksheets you want to combine together;
4) Click to select the range you want to combine, if the ranges are placed in the
same location of each sheet, just need to select one range from a sheet then click Same
range.
3. Go on clicking Next>>, and select the function you want to apply in the merged range,
and check the labels for your merged range. See screenshot:
4. Click Finish, and a dialog pops out to ask you to save the scenario, click Yes to save, or
click No to not save it.
13/15
With Kutools for Excel's Combine
Columns and Rows utility, you can
quickly combine multuple cells based
on row/column and separated by
comma or space, or combine a range
of cells into a single cell with specific
separator.
For instance, here I do thses
operations: (1.)Select Select Combine
columns under To combine selected
cells according to following options;
(2.)Specify a separator for the
combined data, here I select Space;
(3.))Specify the cell you want to place
your combined result; (4.)Specify how
you want to deal with the combined
cells. Click for 60 days free trial!
Relative Articles
Office Tab
Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new
Internet Explorer.
300 New Features for Excel, Make Excel Much Easy and Powerful:
14/15
Read More 60-day Unlimited Free Trial See Price List
1) Select the calculation you want form Function list;
3) Click Add button to add the range into All reference list. To repeat 2) step and 3) steps to
add all ranges needed to merged into this list.
4) Check Top row and Left column under Use labels in section.
5) If you want to link the merged data to source data, check Create links to source data.
15/15