Page 1 of 1

Consolidate Multiple sheets in to Single sheet

Posted: Tue Jul 09, 2024 11:13 am
by admin

Code: Select all

Sub consolidate_Dynamic()
'\\172.168.1.41\staff student folder
'\Ramajayam - Share\Shared Materials\Excel Automation\consolidate.xlsx

For x = 1 To Worksheets.Count
Worksheets(x).Select
If ActiveSheet.Name = "Summary" Then
Else
Sheets(x).Range("a10000").Select
ActiveCell.End(xlUp).Select
Range(ActiveCell, "h2").Select
Selection.Copy
Worksheets("Summary").Select
Range("b10000").Select
ActiveCell.End(xlUp).Select
ActiveCell.Offset(1, 0).Select
ActiveCell.PasteSpecial xlPasteAll
Application.CutCopyMode = False
End If

Next x


End Sub