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

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
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,223,888
Messages
6,175,213
Members
452,618
Latest member
Tam84

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