View Single Post
 
Old 10-15-2016, 09:05 AM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Something along the lines of this should do it.
Hopefully you can follow the commenting.
Code:
Sub CombineJimmysSheets()
    
Dim i As Integer, sht As Worksheet, RngLR As Long
    
Application.ScreenUpdating = False
'loop thru numbers
For i = 1 To 30
    'loop thru sheets
    For Each sht In ThisWorkbook.Sheets
        'if sheet name found
        If sht.Name = "A" & Format(i, "00") Then
            With sht
                'determine last row of range
                RngLR = .Range("A4").End(xlDown).Row
                'copy the range and paste to sheet 1
                .Range("A5:P" & RngLR).Copy _
                Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Offset(1)
            End With
            'don't loop any further looking for sheet already found
            Exit For
        End If
    'check next sheet
    Next sht
'check for next number
Next i
Application.ScreenUpdating = True
End Sub
Reply With Quote