Merge Worksheets to

smk81

New Member
Joined
Jun 9, 2014
Messages
16
I would like to merge 5 (worksheets are named Ohio, Kentucky, Indiana, Michigan, & Pennsylvania) worksheets into a "Master" worksheet. Each of the 5 worksheets I wish to merge have the same column headings. Is there a simple VBA solution I can use? Thanks for any and all help!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,
have assumed the Master worksheet is the right most tab in your workbook and that you only have the size tabs mentioned.

Code:
Sub COMBINE_SHEETS()
    Application.ScreenUpdating = False
    Sheets(6).Cells.ClearContents
    Sheets(1).Rows(1).Copy Sheets(6).Range("A1")
    For MY_SHEETS = 1 To 5
        With Sheets(MY_SHEETS)
            .Rows("2:" & .Range("A" & Rows.Count).End(xlUp).Row).Copy
            Sheets(6).Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial (xlPasteValues)
        End With
    Next MY_SHEETS
    Application.CutCopyMode = False
    Application.ScreenUpdating = True
End Sub

also assume you only want the column headings once.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,770
Messages
5,833,595
Members
430,221
Latest member
pgn29

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
Top