Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 10-15-2016, 09:05 AM
NoSparks NoSparks is offline Combining different worksheets into a single worksheet. Windows 7 64bit Combining different worksheets into a single worksheet. 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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining different worksheets into a single worksheet. Combine values from different worksheets into a single worksheet. jimmy2016 Excel 2 10-06-2016 09:15 AM
How do I populate Worksheets using information entirely from another Worksheet in the same Workbook? BrieDanielle Excel 1 06-18-2016 10:50 AM
Combine or merge multiple worksheets into one worksheet timomaha Excel 1 07-21-2014 01:02 PM
Combining different worksheets into a single worksheet. Multiple Dynamic Worksheets Consolidated into One Static Worksheet mars1886 Excel Programming 3 02-09-2014 12:50 AM
Combining different worksheets into a single worksheet. Cells from other worksheets apear on current worksheet Equilar Excel 3 05-03-2010 01:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft