VBA copy from multiple sheets one hidden

I am using the following to combine data from sheets.
'Ex', 'Ground', 'Intl' data should move to Summary sheet

I am stuck on some issues:
1. there is a blank between the data from these sheets.
2. I also need to copy from hidden sheet "Templates" row 2-4  to "Summary" row 1-2
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Roy CoxGroup Finance ManagerCommented:
Are you trying to combine the data into one table. i.e. one header row but all the data from each sheet below it with no empty rows.
Also, will you be adding to this periodically?
Euro5Author Commented:
Yes Roy - exactly. I need to have the header from 'Templates' and the data from each sheet with no spaces between.

The code should clear each time before compiling.
The entry/additions would only take place on each individual sheet.
Then this compilation would come before processing the data.

Does this help?
Roy CoxGroup Finance ManagerCommented:
I really think that you would be better having all the data on one sheet with an additional column that identifies the "type".

You have MergedCells which make this more difficult. You really should avoid Mergedcells.

The Total Row also interferes.

I would suggest that you convert the data to a Table, this would be simpler
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Euro5Author Commented:
Thanks @Roy

I have it set up this way because it is necessary for the users.
The data can be overwhelming, so we enter on 3 different sheets, but I need to combine for the code.
The code looks only at the "Summary".

I need those total rows, so they can see the totals of each group.
Roy CoxGroup Finance ManagerCommented:
There's better ways with Excel than this. If you put all the data on one sheet then you can use Filters, SubTotals and maybe PivotTables to get different analyses of the data.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Euro5Author Commented:
I had it working, but now stuck again!
Can anyone help work with the way it is set up now?

Sub collate()
Dim wb As Workbook
Dim sh As Worksheet
Dim sh1 As Worksheet
Dim sh2 As Worksheet
Dim sh3 As Worksheet
Dim lr As Long, shAry
Dim reBD As Range
Sheet15.Visible = xlSheetVisible

Set sh = Sheets("Summary")
Set th = Sheets("Templates")

With Selection.Copy
End With
ActiveCell.PasteSpecial (xlPasteAll)

    For i = 1 To 1
        Set sh1 = Sheets("Dom Ex") 'Edit sheet name
        Set sh2 = Sheets("Ground") 'Edit sheet name
        Set sh3 = Sheets("Intl") 'Edit sheet name
        shAry = Array(sh1, sh2, sh3)
            For j = LBound(shAry) To UBound(shAry)
                lr = shAry(j).UsedRange.Rows.Count
                shAry(j).Range("A3:A" & lr).EntireRow.Copy _
                sh.Cells(Rows.Count, 1).End(xlUp)(1)
Application.ScreenUpdating = False
Rows(1).RowHeight = 15
Rows(2).RowHeight = 57.75
Application.ScreenUpdating = True

End Sub

Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.