+ Reply to Thread
Results 1 to 1 of 1

Combine multiple sheets into one sheet

Hybrid View

  1. #1
    Registered User
    Join Date
    02-05-2015
    Location
    United States
    MS-Off Ver
    MS Office 2007
    Posts
    1

    Combine multiple sheets into one sheet

    How do I fix the below Macro to make it copy all rows that has value to the new sheet? and only want the header copy once. Thanks.


    Public Sub Collate_Sheets()
        
        Dim wks As Worksheet
        Dim FirstRow As Long
        Dim LastRow1 As Long
        Dim LastRow2 As Long
        Dim sh As Worksheet
        
        Sheets.Add After:=Sheets(Sheets.Count)
        Set wks = Sheets(Sheets.Count)
        wks.Name = "GoTax Import"
        
        FirstRow = 1
        LastRow2 = 1
        For Each sh In Worksheets
            If Right(sh.Name, 11) = "Final Scrub" Then
                With sh
                    LastRow1 = .Range("B" & .Rows.Count).End(xlUp).Row
                    .Range(.Cells(FirstRow, "A"), .Cells(LastRow1, "V")).Copy wks.Range("A" & LastRow2).End(xlUp)
                    FirstRow = 2
                    LastRow2 = LastRow1 + LastRow2
                End With
    
    End Sub
    Last edited by JBeaucaire; 02-05-2015 at 08:06 PM. Reason: Added missing CODE tags. Please read and follow the Forum Rules, link above in the menu bar. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Combine multiple sheets of multiple workbooks in one sheet
    By Djibril69 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2013, 05:18 PM
  2. [SOLVED] align or combine multiple columns from multiple sheets into one sheet in sequence
    By calif in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-28-2013, 11:49 AM
  3. Replies: 7
    Last Post: 10-19-2011, 08:33 AM
  4. combine counts from multiple sheets to one sheet
    By flyguyph in forum Excel General
    Replies: 2
    Last Post: 12-13-2010, 04:08 PM
  5. [SOLVED] Combine multiple sheets into one sheet?
    By Blueluck in forum Excel General
    Replies: 2
    Last Post: 06-08-2005, 11:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1