Hi,
I'm trying to consolidate info held on 128 sheets using the code below but it doesn't work. Can anyone suggest a correction?
Sub CombineSheets()
Dim rng As Range
Set rng = Sheets("master log").Range("A2:s25000")
Sheets("master log").Activate
rng.ClearContents
Dim i As Integer
For i = 1 To 128
Sheets(i).Range("a7:s2500").Copy
lastrow = Sheets("master log").Cells(Sheets("master log").Rows.Count, 1).End(xlUp).Row + 1
Sheets("master log").Cells(lastrow, 1).Paste
Application.clearcopymode
Application.DisplayAlerts = False
Next i
Range("A1").Select
End Sub
Thanks a lot
I'm trying to consolidate info held on 128 sheets using the code below but it doesn't work. Can anyone suggest a correction?
Sub CombineSheets()
Dim rng As Range
Set rng = Sheets("master log").Range("A2:s25000")
Sheets("master log").Activate
rng.ClearContents
Dim i As Integer
For i = 1 To 128
Sheets(i).Range("a7:s2500").Copy
lastrow = Sheets("master log").Cells(Sheets("master log").Rows.Count, 1).End(xlUp).Row + 1
Sheets("master log").Cells(lastrow, 1).Paste
Application.clearcopymode
Application.DisplayAlerts = False
Next i
Range("A1").Select
End Sub
Thanks a lot