Skip to main content

How to merge or consolidate worksheets or workbooks into one worksheet?

In our daily work, we may encounter a problem that merge hundreds of sheets or workbooks into one sheet for analyzing data which takes a large of time if you use the Copy and Paste command in Excel. Here in this tutorial, I will provide some tips for quickly solving this job.

doc combine 1

QUICK NAVIGATION

Merging all sheets of active workbook into one sheet with VBA
Merging dozens of sheets or workbooks into one worksheet/workbook with clicks
Merging two tables into one and update by a column with clicks
Download sample file


Merging all sheets of active workbook into one sheet with VBA

In this section, I provide a VBA code which will create a new sheet to collect all sheets of the active workbook while you running it.

1. Activate the workbook you want to combine its all sheets, then press + keys to open Microsoft Visual Basic for Applications window.

2. In popping window, click Insert > Module to create a new Module script.

3. Copy below code and paste them to the script.

Sub Combine()
'UpdatebyExtendoffice
Dim J As Integer
On Error Resume Next
Sheets(1).Select
Worksheets.Add
Sheets(1).Name = "Combined"
Sheets(2).Activate
Range("A1").EntireRow.Select
Selection.Copy Destination:=Sheets(1).Range("A1")
For J = 2 To Sheets.Count
Sheets(J).Activate
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select
Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
Next
End Sub
doc combine 2

4. Press F5 key, then all data across sheets have been merged in to a new sheet named Combined which is placed in the front of all sheets.


ot move

Do You Want To Have A Pay Raise and Much Time To Accompany With Family?

Office Tab Enhances Your Efficiency By 50% In Microsoft Office Working Right Now

Unbelievable, working at two or more documents is easier and faster than working at one.

Compareed with well-known browsers, the tabbed tool in Office Tab is more powerful and more efficient.

Reduce hundreds of mouse-clicks and keyboard typing every day for you, say goodbye to the mouse hand now.

If you usually work at multiple documents, Office Tab will be a great time-saver for you.

30-day free trial, no credit card required.

Read MoreFree Download Now


Merging dozens of sheets or workbooks into one worksheet/workbook with clicks

With the VBA, you only can combine sheets in the active workbook, but how can you merge sheets across workbooks to a sheet or workbook?

Merge sheets across workbooks into one sheet
doc combine 18

Merge sheets across workbooks into one workbook
doc combine 3

For solving this job and satisfy other requirements on sheets-combination, the Combine function has been developed with four combination scenarios:

  • Combine multiple sheets or workbooks into one sheet
  • Combine multiple sheets or workbooks into one workbook
  • Combine same name sheets into one sheet
  • Consolidate values across sheets or workbooks into one sheet

Here takes the second option as instance:

Combine multiple sheets or workbooks into one workbook

After free installing Kutools for Excel, please do as below:

1. Activate Excel, click Kutools Plus > Combine, a dialog pops out to remind you the workbooks you want to combine needed be closed. Click OK to continue.
doc combine 4
doc combine 5

2. In the Combine Worksheets step 1 dialog, check Combine multiple worksheets from workbooks into one workbook option. Click Next to go to next step of wizard.
doc combine 6

3. Click Add > File or Folder to add the workbooks you want to combine to the Workbook list pane, then you can specify which worksheet will be joined together by checking names in Worksheet list pane. Click Next to go to the last step of wizard.
doc combine 7

4. In this step, specify the settings as you need. Then click Finish.
doc combine 8

5. A window pops out for you selecting a folder to place the combined workbook, then click Save.
doc combine 9

Now the workbooks have been merged into one workbook. And at the front of all sheets, a master sheet named Kutools for Excel is also created which lists some information about the sheets and links for each sheet.
doc combine 10

Demo: Combine sheets/workbooks into one sheet or workbook

Kutools for Excel:200 + useful handy tools, simplifying the complicated tasks in Excel into a few clicks.

Say Goodbye To Mouse Hand and Cervical Spondylosis Now

300 advanced tools of Kutools for Excel solve 80% Excel tasks in seconds, pull you out of the thousands of mouse-clicks.

Easily deal with 1500 working scenarios, no need to waste time for searching solutions, have much time to enjoy your life.

Improve 80% productivity for 110000+ highly effective people every day, of course including you.

No longer to be tormented by painful formulas and VBA, give your brain a rest and joyful working mood.

30-day free trial with full features, 30-day money back without reasons.

A Better Body Creates A Better Life.


Merging two tables into one and update by a column with clicks

If you want to merge two tables into one and update data based on a column as below screenshot shown, you can try the Tables Merge utility of Kutools for Excel.
doc combine 11

Kutools for Excel: more than 200 handy Excel add-ins to simplify complicated tasks into a few clicks in Excel

After free installing Kutools for Excel, please do as below:

1. Click Kutools Plus > Tables Merge to enable Tables Merge wizard.
doc combine 12

2. In the step 1 of the wizard, you need to separately select the main table and lookup table ranges. Then click Next.
doc combine 13

3. Check the key column you want to update data in the main table based on. Click Next.
doc combine 14

4. Then check the columns in main table you want to update the data based on lookup table. Click Next.
doc combine 15

5. In the step 4 of the wizard, check the columns you want to add from lookup table to the main table. Click Next.
doc combine 16

6. In the last step of the wizard, specify the setting options as you need. Then click Finish.
doc combine 17

Now the main table has been updated the data and add new data based on the lookup table.

Demo: Combine sheets/workbooks into one sheet or workbook

Kutools for Excel:200 + useful handy tools, simplifying the complicated tasks in Excel into a few clicks.


Download Sample File

sample


Recommended Productivity Tools

Office Tab - Tabbed Browsing, Editing, Managing Of Documents In Microsoft Office 2019 - 2003 And Office 365


office tab

A Professional Add-in for Accelerating Excel 2019-2007, shrink hours tasks to seconds

This add-in includes dozens of professional groups, with 300+ options will automate most of your daily tasks in Excel, and increase your productivity at least by 50%. Such as groups of one-click optons and batch conversions.
Now it's your chance to speed up yourself with Kutools for Excel!


Comments (168)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, I have a system that generates an excel file everyday. The daily file name is of format "<filename-12282021>". The 12282021 is the timestamp and it changes everyday creating a new excel file each day. I want to create a Master Workbook and then append the contents of the daily excel file into that master workbook. How can I automate it so it happens by itself everyday and the master file is update with contents of the daily file.   Thank you.
This comment was minimized by the moderator on the site
Hi rd2022, sorry that I have no idea to solve your problem so far. You can go to our forum https://www.extendoffice.com/forum/excel.html to leave this message, maybe some users have the same problem and has been solved.
This comment was minimized by the moderator on the site
In combining shhets I want to add one extra column in combined sheet as ShhetName
Can you suggest ?
This comment was minimized by the moderator on the site
The Combine function of Kutools for Excel can help you to insert sheet name in a new row of each combined range in the combined sheet by checking First row of each range (new row) in Insert worksheet information section in the last step of the Combine.
This comment was minimized by the moderator on the site
Hi - this function works well except my file has more than 900 sheets, and when I change the maximum number of rows (Loc 16, "A65536") to a higher number, the macro doesn't work. Is there a way to increase the number of rows that can be shown on the combine sheet?
This comment was minimized by the moderator on the site
The VBA code works fine but I want the data to be merged horizontally(side by side).
Hope you can help.
This comment was minimized by the moderator on the site
Hi,


Great Code and for the most part it works fantastically well.


Could I suggest creating a written tutorial for each line of code. I'd love to be able to play around with it to suit my Company's needs.

In the meantime however could you talk me through problems that would hinder this code from copying all data from each Sheet? I've noticed some sheets in my workbook aren't being copied at all.

To give you some context I'm dealing with roughly 330 sheets and they hold from 50 to 500 lines in each.


looking forward to hearing from you.
This comment was minimized by the moderator on the site
Hi, Daniel, I do not understand your question as you describe it not clearly, but if you have the Combine function in Excel, it can solve most of your question about combining sheets.
This comment was minimized by the moderator on the site
Hi,

Is it possible to only copy a particular range of cells for example A:4:FU38 from each sheet?


Also in the Combined sheet where the data is copied to, can the tab names from where the data is copied included in column A to enable lookups or to pivot the data?


Finally, can i specify the list of worksheets from which to copy the data across or maybe i can specify something like copy all worksheets to the left of a particular worksheet in the file.


Thanks in advance for your help
This comment was minimized by the moderator on the site
Hi, HS, you mean to combine same ranges from sheets into one sheet, it that right? If so, this article may help you: https://www.extendoffice.com/documents/excel/2754-excel-combine-ranges-from-different-worksheets-into-one.html#a3
This comment was minimized by the moderator on the site
This VBA code is an absolute lifesaver. Thank you!!
This comment was minimized by the moderator on the site
Hi. This code works well but I have the same problem as adj. The 1st row form each tab doesn't appear in the combined tab - except he first tab. Thanks
This comment was minimized by the moderator on the site
Just delete "Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select" from the code.

If you want to merge all rows from all worksheets, just use the code:

Sub Combine()

'UpdatebyExtendoffice

Dim J As Integer

On Error Resume Next

Sheets(1).Select

Worksheets.Add

Sheets(1).Name = "Combined"

Sheets(2).Activate

Range("A1").EntireRow.Select

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

For J = 2 To Sheets.Count

Sheets(J).Activate

Range("A1").Select

Selection.CurrentRegion.Select

Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)

Next

End Sub
This comment was minimized by the moderator on the site
Yes, the code only can keep first row of the first tab, because it is used to consolidate, if you want to keep all contents of each sheet, you can try Combine utility of Kutools for Excel, it is free fior 60 days
This comment was minimized by the moderator on the site
i had a problem when I try to combine all same name worksheet to one worksheet, it works but some value are missing. so what should i do?
This comment was minimized by the moderator on the site
Hello, elok, did the problem appear while you applying Combine function? If so, please go to contact us to describe the problem with more details, our support will handle the problem for you.
This comment was minimized by the moderator on the site
Thanks that macro saved my day. I had over 40 sheets of data to combine into one and although my computer bogged for a minute or two, it completed without issue. The only modification I made was I tweaked the macro to start with A2 instead of A1 since A1 was my column headers.
This comment was minimized by the moderator on the site
Thanks for your support, Andrew, I am glad that the macro can help you.
This comment was minimized by the moderator on the site
hi I would like combine all the worksheets in single sheet where i need data of column A of all worksheets and I need the worksheet names in column B
This comment was minimized by the moderator on the site
Sorry, Thangaraj R, I do not undertsand your problem clearly, could you upload a screenshot to describe your quetion with more detials?
This comment was minimized by the moderator on the site
Hi all,
I need to combine only sheets with identical heading, ship other sheets.


thanks
This comment was minimized by the moderator on the site
Sorry, I do not understand your problem clearly, do you mean to combine sheets with same column header? If so, this article may help you.

https://www.extendoffice.com/documents/excel/3252-excel-merge-excel-files-same-header.html
This comment was minimized by the moderator on the site
Hi all,

I have used the below mentioned code, In my data some blank Rows is there for each tab. Data is not coping after the blank rows. How to combine the all data after the blank rows. Please advise.

Sub Combine()
Dim J As Integer
On Error Resume Next
Sheets(1).Select
Worksheets.Add
Sheets(1).Name = "Combined"
Sheets(2).Activate
Range("A16").EntireRow.Select
Selection.Copy Destination:=Sheets(1).Range("A1")
For J = 2 To Sheets.Count
Sheets(J).Activate
Range("A17").Select
Selection.CurrentRegion.Select
Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select
Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
Next
End Sub

Thanks
Arul
This comment was minimized by the moderator on the site
You can try below code, it will merge all data and skip blank rows.

Sub CombineForm()
Dim xI, xMax As Integer
Dim xCWS, xWS As Worksheet
Dim xObjRRange, xObjCRange, xObjSR As Range
On Error Resume Next
Sheets(1).Select
Set xCWS = Worksheets.Add
xCWS.Name = "Combined"
Sheets(2).Activate
Range("A1").EntireRow.Select
Selection.Copy Destination:=xCWS.Range("A1")
For xI = 2 To Sheets.Count
Set xWS = Sheets(xI)
xWS.Activate
Set xObjRRange = xWS.Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious)
Set xObjCRange = xWS.Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByColumns, SearchDirection:=xlPrevious)
Set xObjSR = Range(Cells(1, 1), Cells(xObjRRange.Row, xObjCRange.Column))
xObjSR.Select
Selection.Copy Destination:=xCWS.Range("A65536").End(xlUp)(2)
Next
xMax = xCWS.Range("a65536").End(3).Row
xCWS.Range("a1:a" & xMax).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
This comment was minimized by the moderator on the site
Thank you, Sunny! This coding is working fine..

But i want to combine all the sheets from row no: 16. Could you help us to update the coding.

Thanks
Arul
This comment was minimized by the moderator on the site
The below code will combine sheets from the second row, you can change the number 2 (xStart = 2) to other number for you need.

Sub CombineForm()
Dim xStart, xFNum, xIntCFMax, xIntRRg, xIntCRg As Integer
Dim xCFWS, xWS As Worksheet
Dim xObjSR As Range
Dim xStrName As String
On Error Resume Next
Application.ScreenUpdating = False
xStart = 2
xStrName = "CombinedForm"
Set xWS = Sheets(xStrName)
If xWS Is Nothing Then
xWS.Delete
End If
Set xCFWS = Worksheets.Add
xCFWS.Name = xStrName

For xFNum = 1 To Sheets.Count
Set xWS = Sheets(xFNum)
If xWS.Name <> xStrName Then
xWS.Activate
xIntRRg = xWS.Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
xIntCRg = xWS.Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
If xStart <= xIntRRg Then
Set xObjSR = Range(Cells(xStart, 1), Cells(xIntRRg, xIntCRg))
xObjSR.Select
Selection.Copy Destination:=xCFWS.Range("A65536").End(xlUp)(2)
End If
End If
Next
Application.ScreenUpdating = True
End Sub
This comment was minimized by the moderator on the site
Thank you, Sunny!

I want to combine the sheet from row no:16. Could you help me to update the coding.

Thanks
Arul
This comment was minimized by the moderator on the site
My headings start on row 26, the first 25 rows are occupied with the parameters I used to generate my reports, it would take a long time to delete these since there are many reports generated. Using the VBA code above, how could I configure this code to exclude the first 25 rows, capture the headings on row 26 and combine all the data under the headings (row 27 onwards) for each worksheet?
This comment was minimized by the moderator on the site
Change all the "A1" in the code to "A26". Save your data before trying this change, just in case!
This comment was minimized by the moderator on the site
Hi.. The VBA code works fine. Thank you! But can you please help on how I can edit the code so that only 2 sheets will be combined? I have 5 sheets in my workbook but I only need to combine 2 of them.
This comment was minimized by the moderator on the site
Just save as the current workbook with a new name and delete other three worksheets which you don't want to combine, now you have only your desired two sheets for VBA code execution.
This comment was minimized by the moderator on the site
hello everyone

I want to merged more workbook data in one so give me suggest
This comment was minimized by the moderator on the site
Hi everyone,

First of all I have to tell that I have no experience with Macro (VBA Codes). However what I need is related to this. Maybe you guys could help me with it.

I have a workbook and in this workbook there are 10 worksheets. The first 9 Sheets have the same order of the coloumns of titles and in these columns there are names, dates, percentages of Project Status, comments to Projects etc.. As I said the columns have the same order just the name of the worksheets (for different Teams in the Organisation) are different.

In Addition to this I have to merge all the worksheets and have them in another sheet which is called "Übersicht" (Overview). However there is a different column in the sheet and it's between "Nr." and "Thema" columns (which are in A1 and A2 in all the 9 Sheets) and this different column called "Kategorie" (in A2 in Übersicht-Overwiev sheet). As this column is between These the order is like this "Nr. (A1), Kategorie (A2) and Thema (A3).....".So this category column (Kategorie) should be empty except this all the Information should be merged into this sheet. And also when there is a Change or update in any worksheet, the Information in "Übersicht" (Overview) sheet needs to update by itself. How can I do this?

P.S.: Every sheet has different filled rows, some 30, some 13, some 5 etc. And the Teams which are responsible for the Sheets can add or delete some rows (in each row there is different Information for different Projects). This also means the number of rows can increase or decrease.

I hope I explained it well. Thanks a lot in advance!

I wish you merry Christmas and a happy new year!

oduff
This comment was minimized by the moderator on the site
The VBA code works fine but I want the data to be merged horizontally(side by side).
Hope you can help.
This comment was minimized by the moderator on the site
THANK YOU for the VB Code. Amazing. Worked perfectly. I had 72 worksheets to combine into one. It took a second and it was done. YOU ROCK.
This comment was minimized by the moderator on the site
Excellent code! Worked very well!
This comment was minimized by the moderator on the site
Hello!
I need your support. I have three sheets (A, B, C) into a worksheet. the sheet contain information on individuals.
Sheet A: contains all individuals considered as ID with information (age, education, etc...)
Sheets B et C: contain some individuals (ID) with information (Organisation, income, etc...)
So I want to combine B and C to A to get all information from A,B, C together.

Jonas
This comment was minimized by the moderator on the site
Thank you so very much! The code worked perfectly! I appreciate the instruction so very much!!!
This comment was minimized by the moderator on the site
Hello, this worked fine at first, but now I see that not all rows from all worksheets are appended into the combined sheet. Please help!
This comment was minimized by the moderator on the site
Oh dear! Thank you so MUCH. Worked PERFECTLY with the Code. Had trouble and was thinking how to resolve this and then...just in a second! Thank you a lot. God bless you!
This comment was minimized by the moderator on the site
This code works for the most part - however, the first line of each sheet (except for the first sheet) is not extracted into the combined sheet. Which piece of the code should be modified to ensure extraction of the first line?
This comment was minimized by the moderator on the site
You rock guys!
This comment was minimized by the moderator on the site
You guys are the best!!! You totally saved me and I look like a super star
This comment was minimized by the moderator on the site
THANK YOU SO MUCH!!!!!
This comment was minimized by the moderator on the site
How to merge multiple workbooks with multiple worksheets into one workbook?
This comment was minimized by the moderator on the site
[quote name="John"], how to merge multiple workbooks with multiple worksheets into one workbook? appriciate if you could reply.
This comment was minimized by the moderator on the site
This is amazing. Thank you so much!
This comment was minimized by the moderator on the site
When installed, Excel 365 gives a memory error and nothing works. I had to uninstall kutools to be able to work again :-(
This comment was minimized by the moderator on the site
Thanks for the help on combining worksheets. Saved me hours of mind numbing work!
This comment was minimized by the moderator on the site
how do i get the macro to insert column "a" and paste the name of the workbook the data came from in the added column
This comment was minimized by the moderator on the site
it works so well for my case. million thanks for sharing!!!!
This comment was minimized by the moderator on the site
It works, Thaaaanks!
This comment was minimized by the moderator on the site
can you please explain me the meaning of Selection.Copy Destination:=Sheets(1).Range(" A65536").End(xlUp)(2) line?What is A65536 used for?
This comment was minimized by the moderator on the site
How to overwrite the updated data over existing data
This comment was minimized by the moderator on the site
Attempted VBA Code. Have 5 worksheets in 2 workbook that need to be combined. All same structure. VBA code will only combine 2 of the worksheets rather than all 5. What do I change in the VBA code to make combine all 5 worksheets? Data in worksheets is all under the 65K .xls row limit and I am using Excel 2016.
This comment was minimized by the moderator on the site
I receive spreadsheets where table header is in starts in row 3. So I need to go to each worksheet to delete columns 1 and 2 for the macro to work. Can I adjust the code, so it would start in A3 instead of A1
This comment was minimized by the moderator on the site
Very much Thanks ... ... :lol:
This comment was minimized by the moderator on the site
[quote]When using the VBA providied above, is there a way for the combined sheet to automatically update when the sheets that is combined are added to it, so it is always running? Thanks!By Nat[/quote] Would like to know the answer to this. Thanks for the great Macro!
This comment was minimized by the moderator on the site
Hi! Can you help me with this problem. I have an excel doc with 12 sheets. In each sheet is a table. With a differend cells format (width & height). I have to copy all sheets in one and save each cells format. Thanks!
This comment was minimized by the moderator on the site
Your macro worked BUT it added each sheet multiple times. i have no idea why...I had 4 sheets with invoice lists (1 septembers, 2 octobers Ect.) and for some reason it added my september back on 2 more times and added eachother one underneath 3x each.... I did not modify or delete anything from the macro just simply copied pasted and ran it...
This comment was minimized by the moderator on the site
For those people who want to update data they already merged you can use this code: Sub Combine() Dim J As Integer On Error Resume Next 'Delete the sheet "Combined" if it exist Application.DisplayAlerts = False On Error Resume Next ActiveWorkbook.Worksheets("Combined").Delete On Error GoTo 0 Application.DisplayAlerts = True Sheets(1).Select Worksheets.Add Sheets(1).Name = "Combined" Sheets(2).Activate Range("A1").EntireRow.Select Selection.Copy Destination:=Sheets(1).Range("A1") For J = 2 To Sheets.Count Sheets(J).Activate Range("A1").Select Selection.CurrentRegion.Select Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2) Next End Sub ---------------------------------- Hope that helps!!!!
This comment was minimized by the moderator on the site
How can i collect specific cells data from around 400 sheet... where all sheet are same format. for ex. I want to get data from A3, A4, A29, B30, C34 and store on a new sheet. thanks in advanced.
This comment was minimized by the moderator on the site
1st thanks for the code, I modified the code following way, Sub Combine() Dim J As Integer On Error Resume Next Sheets(1).Select Worksheets.Add Sheets(1).Name = "Combined" Sheets(2).Activate Range("A1").EntireRow.Select Selection.Copy Destination:=Sheets(1).Range("A1") For J = 2 To Sheets.Count Sheets(J).Activate Range("A1").Select Selection.CurrentRegion.Select Selection.Offset(0, 0).Resize(Selection.Rows.Count - 1).Select Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2) Sheets(J).Activate Range("A1").Select Selection.CurrentRegion.Select Selection.Offset(3, 0).Resize(Selection.Rows.Count - 1).Select Selection.Copy Destination:=Sheets(1).Range("B65536").End(xlUp)(2) Sheets(J).Activate Range("A1").Select Selection.CurrentRegion.Select Selection.Offset(115, 5).Resize(Selection.Rows.Count - 1).Select Selection.Copy Destination:=Sheets(1).Range("E65536").End(xlUp)(2) Sheets(J).Activate Range("A1").Select Selection.CurrentRegion.Select Selection.Offset(116, 5).Resize(Selection.Rows.Count - 1).Select Selection.Copy Destination:=Sheets(1).Range("F65536").End(xlUp)(2) Next End Sub When i tried with this code only around 5/10 sheet, it works fine, but when i tried this code for around 400 sheets then got 2 wrong value and after 255 row no data come for only one column. Another columns data are okey and came. any idea, basically i need to call data (from some specific cell) from around 400 sheets any idea ?
This comment was minimized by the moderator on the site
Excellent Job ....buddy u have refine my 1 hour .... THANKS
This comment was minimized by the moderator on the site
When I try to use this VBA, it caps out at 79,160 lines (including header). Any suggestions on how to tweak the code or could it be the data in the spreadsheets.
This comment was minimized by the moderator on the site
I am using the VBA below with great effect with all the sheets in workbook but now I am trying to exclude one sheet name " OAL Index" and just cant seemed to get it right. It keeps selecting all the sheets Any points to the right direction would be appreciated. Sub Combine() Dim J As Integer On Error Resume Next Sheets(1).Select Worksheets.Add ' add a sheet in first place Sheets(1).Name = "Combined" ' copy headings Sheets(2).Activate Range("A2").EntireRow.Select Selection.Copy Destination:=Sheets(1).Range("A2") ' work through sheets For J = 2 To Sheets.Count ' from sheet 2 to last sheet If Sheets(J).Name "OAL Index" Then Sheets(J).Select Replace:=False Sheets(J).Activate ' make the sheet active Sheets(J).Select Range("A1").Select Selection.CurrentRegion.Select ' select all cells in this sheets ' select all lines except title Selection.Offset(2, 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) Next End Sub Thanks All
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations