aparvez007
Member
Hi Ninjas...
I have 7 sheet which i want to compile in sheet 1 using some shortcut.
Please help...
I have 7 sheet which i want to compile in sheet 1 using some shortcut.
Please help...
Public Sub Compile_Data()
'I have assumed:
'First Sheet is where you want to compile data from sheet no. 2 to 8
'Name of first sheet is 'Main'
Dim wsDest As Worksheet: Set wsDest = Sheets("Main")
Dim lngRow As Long
Application.ScreenUpdating = False
wsDest.Cells.ClearContents 'Empty the sheet Main before copying
lngRow = 1 'First sheet's data will go to row 1
For i = 2 To Sheets.Count 'Change to 8 if you have more sheets and you want only 7
With Sheets(i)
.Range("A1:AP81").Copy 'Range Reference is hard coded
wsDest.Range("A" & lngRow).PasteSpecial xlPasteValues
lngRow = lngRow + 82
End With
Next i
Application.ScreenUpdating = True
End Sub