+ Reply to Thread
Results 1 to 8 of 8

VBA to find cell value and copy entire row to next available row on another sheet

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Re: VBA to find cell value and copy entire row to next available row on another sheet

    here you go:

    Sub copyto()
    
    Dim Cell As Range, Ws As Worksheet
    
    For Each Ws In ThisWorkbook.Worksheets
    
        If Ws.Name <> "SOIMPORT" Then Ws.Activate
    
        For Each Cell In Range("A2", Cells(Rows.Count, 1).End(xlUp))
        
            Cell.Activate
            
            If ActiveCell.Value = Right(ActiveSheet.Name, 1) Then
            
            ActiveCell.EntireRow.Copy
    
            Sheets(6).Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
            
            End If
            
            Next Cell
            
            Next Ws
                
    End Sub
    Last edited by Bishonen; 10-02-2012 at 08:29 AM.

  2. #2
    Registered User
    Join Date
    08-11-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: VBA to find cell value and copy entire row to next available row on another sheet

    Thanks Bishonen. Only thing is the live workbook has additional sheets I didn't include in the sample so copying each sheet won't be an option. I attached the full sheet with all tabs. Sorry for the confusion! Can this be done to name the individual sheets in the order I listed them in my OP to copy to SOIMPORT?
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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