+ Reply to Thread
Results 1 to 3 of 3

Copy and paste rows from one sheet to another w/ multiple filters

Hybrid View

perducci Copy and paste rows from one... 09-25-2012, 11:17 AM
arlu1201 Re: Copy and paste rows from... 09-25-2012, 12:13 PM
perducci Re: Copy and paste rows from... 09-26-2012, 11:01 AM
  1. #1
    Registered User
    Join Date
    10-06-2011
    Location
    Salt Lake City, UT
    MS-Off Ver
    Excel 2010
    Posts
    78

    Copy and paste rows from one sheet to another w/ multiple filters

    I want to copy and paste rows from one sheet ("wobid") to another ("RES"), but only if the row has certain values in certain columns. Specifically, if the row has the value "Completed" in column C and the value "AC" in column G, I want to copy the entire row and paste it into the sheet "RES".

    Can someone please help me figure this out??

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy and paste rows from one sheet to another w/ multiple filters

    Try this code - put it in a standard module
    Option Explicit
    Sub copy_rows()
    Dim i As Long, lrow As Long
    
    Application.ScreenUpdating = False
    
    With Worksheets("wobid")
        lrow = .Range("A" & .Rows.Count).End(xlUp).Row
        For i = 2 To lrow
            If .Range("C" & i).Value = "Completed" And .Range("G" & i).Value = "AC" Then
                .Range("A" & i & ":G" & i).Copy Worksheets("RES").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
            End If
        Next i
    End With
    
    Application.ScreenUpdating = True
    
    End Sub
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    10-06-2011
    Location
    Salt Lake City, UT
    MS-Off Ver
    Excel 2010
    Posts
    78

    Re: Copy and paste rows from one sheet to another w/ multiple filters

    Thank you arlu1201

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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