Excel.Tips.Net ExcelTips (Menu Interface)

Condensing Multiple Worksheets Into One

Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Condensing Multiple Worksheets Into One.

If you get workbooks that have identically structured data on each worksheet, you may be interested in a way to combine the multiple worksheets into a single, large worksheet.

The concept behind doing the condensation is rather easy: You simply need to copy the data from the second and subsequent worksheets to the first empty row on the first worksheet. Fortunately, Excel includes a feature that allows you to do this very process—the Consolidate tool.

The Consolidate tool allows you to combine worksheets where data is defined by position or by category. By position means that the data is in the same position on every worksheet. For instance, if the data tables on each worksheet have the exact same columns, then you would consolidate by position. By category means that you want to combine data from tables in which the data may not use a consistent structure. You use this type of consolidation if the columns in the data tables are in different orders.

In the workbook whose worksheets you want to consolidate, choose Data | Consolidate. Excel displays the Consolidate dialog box. (See Figure 1.) There are many controls in the dialog box, but the primary thing you need to worry about is specifying the ranges to consolidate.

Figure 1. The Consolidate dialog box.

You specify ranges by using the Reference box. Specify in the box the first range you want to consolidate. If you are consolidating by position, then the reference should not contain any column labels; if by category, then you should. When you specify the range reference, you click Add, and the reference appears in the All References list. You continue to define reference ranges until they are all complete.

If you want the consolidated data to contain links to the original data, then make sure the Create Links to Source Data check box is selected, otherwise clear it. You can then click OK to do the consolidation.

Note that there are other controls in the Consolidate dialog box; the controls mentioned above are the ones you should pay attention to at a minimum. The best way to find out what the others do is to play around with them, doing a few consolidations.

If you prefer to not use the Consolidate tool, you can easily create a macro that will do the consolidation for you—provided the structure of each worksheet is identical. The following macro steps through all the worksheets and combines the data to a new worksheet it adds at the beginning of the workbook.

Sub Combine()
    Dim J As Integer

    On Error Resume Next
    Worksheets.Add ' add a sheet in first place
    Sheets(1).Name = "Combined"

    ' copy headings
    Selection.Copy Destination:=Sheets(1).Range("A1")

    ' work through sheets
    For J = 2 To Sheets.Count ' from sheet 2 to last sheet
        Sheets(J).Activate ' make the sheet active
        Selection.CurrentRegion.Select ' select all cells in this sheets

        ' select all lines except title
        Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select

        ' copy cells selected in the new sheet on last line
        Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
End Sub

When the macro is done, the first sheet in the workbook, named Combined, has all the data from the other worksheets. The other worksheets remain unchanged.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3005) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Condensing Multiple Worksheets Into One.

Related Tips:

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!


Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 5+3 (To prevent automated submissions and spam.)
           Commenting Terms

Comments for this tip:

shahsavan    04 Jan 2017, 05:25
how can i relative address the excel sheet name to a cell like this
Jane    30 Dec 2016, 12:15
And it worked without any changes even in Excel 2016 for Mac!
Jane    30 Dec 2016, 12:14
I looked EVERYWHERE for a simple answer to my problem, to simply combine the tables in multiple worksheets (over 130 sheets) within a single workbook into a new sheet within the same workbook. You are da man!!!!!

The macro worked best for me, as I didn't want a sum, avg, etc., of my data, just copying the data while keeping my original into. Only one thing I'd do to make this perfect is to keep the first sheet and place the combined data into another sheet, but I can simply copy that sheet back in from a copy of the original file.
Laura    21 Dec 2016, 05:36
thank you

working perfect :)
kadr leyn    20 Nov 2016, 11:50
Thanks for tutorial and codes.

I made some additions to the codes and added the ability to take the subtotal of the desired column:

It's video:https://www.youtube.com/watch?v=EO8qq_mMF3Y

Application.DisplayAlerts = False
    Application.DisplayAlerts = True

Sheets(1).Name = "Grand_Table"
Selection.Copy Destination:=Sheets(1).Range("A1")
For J = 2 To Sheets.Count
Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select
Last = FindLastRow(Sheets(1))
With Sheets(1).Cells(Last + 1, "A")
.PasteSpecial xlPasteValues
  .PasteSpecial xlPasteValues
  .PasteSpecial xlPasteFormats
  End With
  'Application.CutCopyMode = False


Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(6), _
Replace:=True, PageBreaks:=True, SummaryBelowData:=True

Premkumar John    17 Nov 2016, 01:16
Can you please help me. I have four sheets in my work book and wish to combine only sheet 1 & 2

Kindly seek your valuable advise

Thank you
Jose    10 Nov 2016, 00:19
Tried copy/paste the code to VBA but it only consolidates 2 out of 10 worksheets. Please help point out where I'm getting it wrong. Thanks.
Katherine    25 Oct 2016, 10:52
The macro did not work for me. I had an xml export from a database that separated everything into tabs. It had headers that I removed, in case that was the issue. But it's still showing up as "Sheet63" and completely blank. Each tab is formatted the same, but is there a reason why this might not be working?
Steve    30 Sep 2016, 16:13
I have a MACRO VBA worksheet that i have created to help track different process for jobs i give to contractors. i am trying to put together a report based on the supervisor assigned to the jobs that shows the job number, who its issued to, date started, the status and finally notes. my work sheets are labeled as follows: Ready, Scheduled, InProgress, OnHold, and completed. please help lol
Rachael    15 Sep 2016, 16:14
After I ran the macro I literally said I LOVE YOU!!! out loud. You have saved me so much time. Thank you thank you thank you!
JLP    25 Jul 2016, 13:57
I have information in A4:V4 on 30 different sheets that I would like listed into one sheet titled "SUMMARY". How do I go about doing that? Thanks in advance.

MICHELLE    21 Jul 2016, 13:57
Works great, but how can this be macro be setup to automatically update the consolidated page when there is a change on one of the worksheets?
Adriana    26 Jun 2016, 12:18

I am trying to combine multiple spreadsheets using the above code, but when i run it, if it meets a blank row, the code stops. Any tips ?

Thank you
Dhirendra Kumar    11 Jun 2016, 06:21
Sub Combine()
    Dim J As Integer

    On Error Resume Next
    Worksheets.Add ' add a sheet in first place
    Sheets(1).Name = "Combined"

    ' copy headings
    Selection.Copy Destination:=Sheets(1).Range("A1")

    ' work through sheets
    For J = 2 To Sheets.Count ' from sheet 2 to last sheet
        Sheets(J).Activate ' make the sheet active
        Selection.CurrentRegion.Select ' select all cells in this sheets

        ' select all lines except title
        Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select

        ' copy cells selected in the new sheet on last line
        Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
End Sub
Above code will work only on single worksheet, if I have multiple worksheets then how I can pull data and if I want to pull data from specific cell like A2, B4, D6 & K35. what code need to apply.

Please help me, I am not aware of VB coding.

Nadine O    06 Jun 2016, 14:19
Thanks - works great!
I had to delete blank rows at the top of a couple of sheets, otherwise only the header gets copied over.
Jackie    26 May 2016, 08:18
How to cosnolidate work sheets. How to enter the data in the reference box correctly.
Diana    12 May 2016, 12:05

Please see below for code I have as a base.

I am trying to copy ALL rows including the header. I tried to remove the offset and change the numbers but no luck.

Any help would be great!

Sub Combine()
    Dim J As Integer

    On Error Resume Next
    Worksheets.Add ' add a sheet in first place
    Sheets(1).Name = "Combined"

    ' copy headings
    Selection.Copy Destination:=Sheets(1).Range("A1")

    ' work through sheets
    For J = 2 To Sheets.Count ' from sheet 2 to last sheet
        Sheets(J).Activate ' make the sheet active
        Range(Selection, Selection.SpecialCells(xlLastCell)).Select
        SSelection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2) ' select all cells in this sheets

        ' select all lines except title
        Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select

        ' copy cells selected in the new sheet on last line
        Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
End Sub

vincent    09 May 2016, 11:14
Works great, but how can this be macro be setup to automatically update the consolidated page when there is a change on one of the worksheets?
Wayne    04 May 2016, 21:01
Thank you for the macro.
It worked beautifully.
Subi    28 Apr 2016, 14:16
Was able to combine 97 tabs in one. fabulous!
G Durga REddy    28 Apr 2016, 03:16
I have an Excel File with 10 Excel Sheet.

I Want to Copy 10 Excel Sheets Date into 1 Excel Sheet (that one is First Excel Sheet)

But this tip in not working

Requesting you to provide the usefull Tip
suresh kondur    07 Apr 2016, 05:05

It was owesome. Saved much time in consolidation
santanu    03 Apr 2016, 06:15
I could able to combine 3 worksheets, which I wanted. You Rock......
scarlet    04 Mar 2016, 11:53
Hi, the macro works very well, I would just know 2 more things:
1. How to get in the new sheet the Column name?
2. How to order the new sheet by column (ex. Column D, Data sort by most recent)

Thank you very much
Brad    03 Mar 2016, 15:21
I used the macro that did the consolidation of many spreadsheets in many workbooks to make short work on combining several hundred spreadsheets into one. The macro save me a good deal of time. Really appreciate the help.
Becca    02 Mar 2016, 13:34
I was trying to combine 13 worksheets and used the code but it combined only 2 of the 13. I made sure all row labels are identical and tried several times but unfortunately got the same result.
David    02 Mar 2016, 12:12
This site is incredible. I have often used it to quickly find the solution for many complex operations in Excel and all have worked the first time from the canned Excel tools that are walked through so well to the macros that make the operation run seamlessly. Thanks to Mr Wyatt for all of his shared knowledge, It has saved me weeks if not months of brute force work over the years.
Dixie    19 Feb 2016, 14:52
I used this in Excel 2010 to combine 14 sheets in one workbook. It worked perfectly. First time I have ever copied code from a website and it worked. Thanks.
Senthil    17 Feb 2016, 23:15
Superb... Great.. It works for me.. Thanks a lot..
Ying    11 Jan 2016, 18:33
I kept on trying to run the codes---

I have three sheets of data, each sheet contains about 3500000 rows.

I have tried couple of the Selection.Copy Destination options but the end result of my combined sheet is always unsatisfactory:

Instead of adding up all the rows of all my spreadsheets, I notice that my combined sheet has the same amount of row count as my first sheet, and that the beginning row and the end row is the same which tells me that the code has failed to copy and paste the other two sheets.

Any idea what the problem could be? and how to fix it?

John    05 Jan 2016, 11:59
Just for reference, if you are using a large data set for this, the formula specified in the last line will cause truncation if you have more than 65,535 total rows, as the formula above seems to be written for older version of Excel.

You may want to try : Selection.Copy Destination:=Sheets(1).Range("A" & Rows.Count).End(xlUp)(2)
Kobi    16 Dec 2015, 09:14
Fantastic. Just had an idea to automate the data mining. This code had solved 50% time.
David Caple    01 Dec 2015, 01:18
I'm sorry to report that the VB code does not work (Excel 2010). When attempting to run it I get a "Compile error: Invalid outside procedure" :(
Jill Hinson    23 Nov 2015, 21:38
This works great. And, I need to combine and link the source data. Do you know how to add that to the marcro you gave us?

Thanks so much,
Tina    29 Oct 2015, 06:21
i have been trying to copy and auto populate entries from multiple tabs to form and a master sheet, which automatically adds any new entries added
the consolidate formula is not copying any information what so ever into the newly formed sheet
urvanki    28 Oct 2015, 03:22
I have similar question as Priya. I want to combine particular rows from each sheet into a single sheet and also keep the names of the sheet to identify which source it is coming from.
Edmon    27 Oct 2015, 20:37
How to exclude some of the worksheets from the formula? And can you ask macro to dump the combined data into a worksheet that is already in the file and not create a 'combined' worksheet everytime to run macros.
LT Yu    05 Oct 2015, 06:14
Hi I want to know how do I specify in the macro if I only want just two out of the three worksheets to be combined into one.Is that possible? Thanks!
DShelton    21 Sep 2015, 14:58
Great solution. Thanks for sharing!
Jimmy    17 Sep 2015, 20:06
Legend ! Works perfectly - Thank you !!
Priya    16 Sep 2015, 07:50
I want to copy a particular row number e.g. row no 11, from over 150+ worksheets in a single workbook. workbook names are 101, 102, 103, 104 etc having same format across.
I also want to put together this row number from all worksheets in separate sheet one below the other.
The same goes for any selected column.
Kindly help.
I tried the above code, it copied row no.2.
Vinod    21 Aug 2015, 19:00
Thanks a ton !!!!!
Lorin Rivers    03 Aug 2015, 15:35
This also works in the latest Excel for Mac (2016).

If you are having trouble getting this code to work, make sure that in each worksheet there's nothing above the data you want to combine
Ellie    30 Jul 2015, 13:01
Excellent! Worked like a champ with Excel 2013.

Thank you,
Pawan K Mishra    07 Jul 2015, 02:04
Hi Guys,

I tried this macro, But in my case only only sheet 1 is coming in combined file, rest are not coming into this

Please Help
mAHEN    26 Jun 2015, 05:03
What is the "this" that didn't work for you? There are multiple techniques described in the tip.
Vijay Menghani    09 Jun 2015, 12:08
Great Job, it worked first time without any issues and solved my task.

thank you so much..!!
Samuel    09 Jun 2015, 09:06
It worked like magic to an amateur.
It saved a lot of time; I was expected to merge 58 sheets with 'detailed' details. Thank you so so so very much.
God bless you.
Harish    22 May 2015, 02:23
I want to combine different excel sheets data in one folder to on excel sheet.How can i do....assist me how to do...
Student    19 May 2015, 15:38
Hello, Great work!

But i need only first column and last column of all the worksheets, Combined into 1. And all the worksheets has different number of Columns.
David    09 Apr 2015, 09:17
Great help!
This macro works great for me, thanks much!
What if I want the resulting sheet "Combine" only contains values (not formula?

Much appreciated in advance!
Revd Stephen Froggatt    21 Mar 2015, 07:59
Thank you so much, Allen, for this excellent macro. Worked first time and did exactly what I needed.
Amanda    17 Feb 2015, 11:09
I like the macro but I have a similar issue has someone previously. If I use the macro with a file with no appropriate data that I want to copy over(as in I've added a filter and it filters data out), it copies the headings over. Why is this? Is there a way to stop it?
Ivan    09 Jan 2015, 05:05

I really like the code but I need help changing the last part of it. I would like to paste the information as values.
Could you please help?

Many thanks
Edward K    07 Jan 2015, 09:52
Tried using this formula and it did produce a new worksheet titled "Combined" but did not populate the sheet with any data. To be fair I am grasping at straws since I have almost no idea what I am looking at in the code here. I am attempting to pull data from about 300 other worksheets together and need to get data from the "A21:J42" range. Each existing worksheet is identical but their is no standard naming convention for the worksheets. Would appreciate any guidance.
Andrew    03 Jan 2015, 22:21
Hi Julie, I found and used some software for a task similar to yours It is called Merge Without Macros and you could use this software to merge the worksheet you just got with your original spreadsheet. Here is the link to download it https://sourceforge.net/projects/mergewithoutmacros/
Julie    12 Dec 2014, 12:58
We had 400 members just added to our local; I need to add them to our spreadsheet but every member has their own tab on the worksheet I was sent. Is there a way to consolidate the tabs without having to copy & paste? The data is in the same position on each tab. Thank you!
Steve    04 Dec 2014, 15:34
Thanks Charlie - I had considered that but was hoping to accomplish it using the Macro. This thing works pretty slick and I am sure some Macro guru's out there know what the fix is or maybe it just cant be done - I noticed another user had the same issue (Asger) back in Jan 2013
Charlie    04 Dec 2014, 14:44
Ok Steve - just in case nobody comes up with a more elegant solution, here is an idea I came up with that accomplished what I wanted: Before running the macro, shift-select all of the sheets in the workbook, & then select the column(s) containing the formula & copy & paste special/values in place. By first selecting all of the sheets, performing this action on one sheet produced the same result on every sheet. Then you can run the above macro and you will get only data, & no formulas.

If you want to preserve the original formulas on the original sheets, you can copy the new "Combined" tab to a new workbook and save under a different name.
Charlie    04 Dec 2014, 14:29
That's funny - I found this same macro on the same day as Steve, and I have the same question - how can you combine just values from each worksheet, not formulas? My first thought was to edit the macro and replace Paste with Paste Special Values, but on closer inspection I saw there is no paste command in the macro! Must be magic!
Steve    04 Dec 2014, 11:03
This is fantastic - I don't work in VBA, so being able to cut and paste this and run it is FANTASTIC - Is there a way to copy only the values over to the combined sheet created? - Some of my sheets have formulas that allow for the user to enter a quantity and then that quantity multiplies down through that sheet - The multipliers can be different on the separate sheets. Thanks in Advance
Ravi Sailesh    01 Dec 2014, 07:07
It saved a lot of time and effort.
Combined 62 pages at one go.

Thanks a lot
Luke    24 Nov 2014, 11:51
How would I be able to modify to be able to block a 4 sheets (exactly the same) from different workbooks and combine into one worksheet?
Vic    29 Oct 2014, 16:38
Thank you very useful macro :)
Raghava    16 Oct 2014, 01:37
Thank you for the code ... it has saved me from alot of manual work...
thanks again.
Vishal    04 Sep 2014, 06:24
Very useful... Thanks
Student    20 Jun 2014, 05:15
Hi again!
I wanted to know how I can modify this macro so that when I make changes to the combined sheet, those changes are also made in the original sheets and viceversa.
Student    22 May 2014, 12:05
Your macro is excellent, easier to use than RDB Merge, and extremely useful for my thesis.
Student from University of Cambridge UK
Danny    03 Apr 2014, 13:56
Thank you...This helped save me hours..
rasha    25 Feb 2014, 03:51
if we have different
sheet1 start in A1
sheet2 start in A2
HOW we can solve it ?
Simon Murray    03 Dec 2013, 04:09
If only someone could re-post that macro explaining which parts to change for what!
I have the same data in a same sized table in one partricular named sheet in many workbooks that i want to combine...HELP PLEASE.
Greg Mouning    31 Oct 2013, 17:33
FYI, when I tried to implement the changes provided by "Michael (micky) Avidan 04 Aug 2013, 06:52" this macro failed. First, I had to define SH as a Variant to the top of my macro as follows:

Dim SH as Variant

Then the macro work successfully!
Tatiana    30 Oct 2013, 09:15
Thank you so much!
Michael (micky) Avidan    04 Aug 2013, 06:56
By the way - the command:
Selection.Copy Destination:=Sheets("Combined").Cells(Rows.Count, 1).End(xlUp)(2)
Allows to use the code in ALL(!) Excel versions (2002-2013) because it ia not limited to row 65536.
Michael (Micky) Avidan
“Microsoft®” MVP – Excel (2009-2014)

Michael (micky) Avidan    04 Aug 2013, 06:52
Try to replace the Looping section with the following commands:
On Error Resume Next
For Each SH In ActiveWorkbook.Sheets
      If SH.Name <> "Combined" Then
           Application.GoTo Sheets(SH.Name).[a1]
           Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select
           Selection.Copy Destination:=Sheets("Combined").Cells(Rows.Count, 1).End(xlUp)(2)
      End If
Michael (Micky) Avidan
“Microsoft®” MVP – Excel (2009-2014)
Kavin    03 Aug 2013, 13:03
The macro assumes the subsequent sheets are named as Sheet1, Sheet2, and so on. Therefore, it works fine.

I've a workbook with each differently named sheets. Can we tweak the macro to ignore the sheet names, and rather look at all the sheets one after another? Pls advise
Jamie    01 Aug 2013, 08:09
Excel Combine = Urgh
Macro = Brilliant

Thank you.
Greg    31 Jul 2013, 22:04
Update2: I tried substituting in Arhant's code even though the problem he described was not what I was experiencing, and it FIXED THE PROBLEM! Thanks so much Arhant AND Allen for a great algorithm.
Greg    31 Jul 2013, 17:05
UPDATE: Even on the first run of the macro ... if row 2+ is blank ... it pulls in the title bar from that page and populates the consolidation page with the title bar data.
Greg    31 Jul 2013, 17:02
Awesome Macro ... HOWEVER, I have a problem and haven't figured it out quite yet ... Any suggestions???

If I run the macro it pulls in and consolidates all of the data into the new sheet and everything looks great ... but ... If I reun the macro a second time (as someone might do accidently) ... then it pulls in the heading (title bar) of any "blank" spreadsheet ... that is ... any spreadsheet that has a title line on Row 1 ... but ... has no content in rows 2 on .... will populate the consolidation sheet with the title row.

Very strange ... can't figure out why it would do that ...

Any Help?
Maggie    08 Jul 2013, 13:29
Thank you very much for the macro and for Arhant's tips re Selection.CurrentRegion.Select
as my worksheets had titles separated by a blank line. Worked a treat!
Denan    30 Jun 2013, 02:18
Great Man! Thanks so much :D
Mike D    30 May 2013, 00:05
This ROCKS! Thank you!!
raj    02 May 2013, 05:55
Dear Sir,
1) i have 1000 File names with Path (All Files are Different Subfolders)
2) i need $H$11 value in every file.

Please help on this.
Suraj Singh    29 Apr 2013, 13:12
Hi Sir,

That is so cool script.
Mark Curtin    26 Apr 2013, 09:16
Works great. Thank you.
Is there any way to have the macro only run or apply to certain worksheets? In my case I would like it to only run on Worksheets that have the word "Tasks" in the worksheet name.
Troy    09 Apr 2013, 14:31
Hi, thanks so much for your script, it's working almost perfectly. Could I ask you how to do 2 extra things in your script?

I'd like it to paste the cells on the new worksheet starting at column A4 instead of the first available line?

Also, is there a way to automatically resize the cells to fit the text?

Again, thank you for this script, it's excellent!
Lisa    15 Mar 2013, 17:34
The macro worked perfect! I combined 398 spreadsheets within the same workbook into one combined spreadsheet. Wonderful!
Arhant    04 Mar 2013, 09:37
This macro has a couple of limitations which can affect the consolidation:-

1. It assumes that the headings are on Row 1 (this is true in most cases else some of the references to Source sheet A1 can be changed as required)

2. "Selection.CurrentRegion.Select ' select all cells in this sheets" - This actually selects only the current region of contiguous data. ie if there are a lot of blanks between data, a lot of data might be missed out. The way out of this would be to use this code:

Range(Selection, Selection.SpecialCells(xlLastCell)).Select

3. This code "Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)" uses column A to search for the last updated data row, which causes a problem. Eg. All the data from a sheet is copied onto the consolidated sheet, but this data has column A blank, then the code will end up overwriting all the previously pasted data.

The solution is to ensure that the last cell in column A of every sheet is filled with any data (ie. not blank). Then this will work fine. Alternatively a macro to fill blanks in all the sheets with spaces may also work fine

lucy    15 Feb 2013, 07:35
Hi, I have tried this macro (i have a workbook with 2400 sheets)

each sheet has a different number of lines but no more than 27 and each has identical columns upto J. when i run the macro on the combined page all it shows is one line of data which is the first line where there are some merged cells on each worksheet.

What am i doing wrong?
Keith    13 Feb 2013, 06:59
Macro worked prefectly for me. thanks
kaviraja    07 Feb 2013, 06:10
how to excel sheets data's compile in one sheets
kavita    30 Jan 2013, 03:19
Dear All
please help me how marge multipale workbook data in one workbook.
Nfolgers    22 Jan 2013, 15:18
This seemed to work well, but for some reason it selects some of the rows correctly but on other sheets in only selects the first two column. Its as if these were the previously highlghted data. Is there a way to tell it to be sure the selection is correct?
Asger    22 Jan 2013, 10:12
This macro is amazing. Thanks a lot.
I do have one problem though. How do i make the macro copy values instead of funktions?
Manoj    21 Jan 2013, 08:00
Lucas    16 Jan 2013, 06:38
Thank you so much!!!
The easiest code I've found in internet!
Jacob    11 Jan 2013, 11:58
I want to take rows from many identical sheets and compile them. So if 5 sheets have 5 rows, the summary sheet should have 25 rows. The consolidate is adding the information in the cells so the summary sheet has only 5 rows. I don't want to add anything only compile my rows. Any advice on doing this without a macro? Thanks.
shiva    11 Jan 2013, 03:50
that is ok but i have to move a row of column G if its any of the field contains "india" as a value. so for that what to do....
job    04 Jan 2013, 21:56
I run it but the data I am combining has a ' as the first character in any cell that actually has data. Is there a way to amend the macro to remove the ' and bring the rest of the data?
J    04 Jan 2013, 15:29
God Bless You!
I looked for two days and then cam across this. I tweeked it and it works great.
Can't thank you enough.
Lynette    07 Dec 2012, 11:05
This macro worked! Thank you sooooo much!!!!
Monique    16 Nov 2012, 11:25
The macro worked perfect! This saved my team so much time. I was the office hero for about 15 minutes...

I can't THANK YOU enough.
lal    15 Nov 2012, 14:59
thank you, this macro worked perfectly for me, no tweaking or anything. Really great- you saved me a ton of time! I can't get "consolidate" to work the same way, but I don't care!
Nico    19 Sep 2012, 13:05
Thank you very, very much!

Would have taken me much time to figure out since I'm not usually programming in VB and I have no knowlege about Excel's object model.
Mark Bryson    18 Sep 2012, 18:50
Totally rocked, thanks!
debanjan chanda    30 Jul 2012, 05:01
Will it work if the sheet name is not Sheet 1,2 or 3 but some thing esle.
Kerwin    17 Jul 2012, 00:48
Great! Thank you for sharing. I helped me finished my task and spend more time with my family. I appreciate you posting this online. Cheers!
Ronald    18 Jun 2012, 04:55
I have consolidated multiple worksheets into one. The problem i have is that i have added another line on the source data and that line is not showing on the consolidated worksheet even though it is within the consolidated range. Please help.
Gregory Mouning    06 Jun 2012, 14:47
Hi Allen,

I tried to use the Combine Macro on my 2007 Excel spreadsheet and the data from my Worksheets are not combined into one Excel worksheet. The macro appears to transverse through each of my worksheets but creates an empty worksheet.

Can you tell me what I am doing wrong?
Amit    04 May 2012, 16:01
Hi Allen,

This works great! However, would it be possible to add a new column to the Combined worksheet with value = <worksheet name>?

So, on the combined worksheet, a new column is added at the end which will contain the name of the worksheet from which data is copied.

AL    28 Apr 2012, 18:30
it woudl be useful if you woudl include full detailed examples and screen shots

vince    22 Mar 2012, 09:54

Thanks this works nicely.

Do you know if there is a way to also copy the row/column formatting?

For example the column width.

Thanks again.
Christine    29 Feb 2012, 10:04
Sorry - I meant the Consolidate tool from Excel.

Your macro is working beautifully. Is there any way to get it to just consolidate selected worksheets? I have a workbook with a growing number of sheets, but just want to consolidate 4 at a time.
awyatt    15 Feb 2012, 13:58
What is the "this" that didn't work for you? There are multiple techniques described in the tip.
christine    15 Feb 2012, 13:55
This didn't work for me; it only consolidated the first row - so I had a "combined" sheet of three duplicate rows and that was all.

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2017 Sharon Parq Associates, Inc.