combine Sheet

Rahulwork

Active Member
Joined
Jun 9, 2013
Messages
284
Hi Everyone,

I need your small help in execute a macro to combine sheet

i have three sheet by the name of sheet1, sheet2 and sheet3

all have same headers and data avaiable in A1:C10

i want to combine all three sheets into one.

kindly help
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hello,

Into which sheet do you want to combine them?
How do you want to combine them? Which ranges?
 
Upvote 0
I have three sheet by the name of Class A Class B and Class C and having same row header

- want to combine them in 4th sheet which name is consolidate
- I want to combine these three sheet like we can do manually all data of class A and then post class A, all data of class B and so on
- there shouldnt by any range but should start from B1 of each sheet and end should be last value cell
 
Upvote 0
Hi
Try
Code:
Sub Loopthrough()
    Application.ScreenUpdating = False
    Application.DisplayAlerts = False
    Sheets("sheet1").Range("a1:c1").Copy Sheets("consolidate").Range("a1:c1")
    For Each sh In ActiveWorkbook.Worksheets
        If sh.Name <> "consolidate" Then
            With sh
                a = .UsedRange.Offset(1)
                Sheets("consolidate").Range("a" & Sheets("consolidate").Cells(Rows.Count, 1).End(xlUp).Row + 1) _
                        .Resize(UBound(a, 1), UBound(a, 2)) = a
                 Cells(1, 1).Select
            End With
        End If
    Next sh
    Application.ScreenUpdating = True
    Application.DisplayAlerts = True
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top