• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Copy Row based off of value to new sheet

Brandon P

New Member
Hey all, I'm trying to figure out this macro. I'm hoping to search an entire column for a value and if that value is present copy the row it is in to a new sheet. Can you assist? This is what I have found so far, but I could be completely off.
Code:
Private Sub Worksheet_output(ByVal Target As Range)
    Dim nxtRow As Integer, b As Boolean
    'Determine if change was to Column E (5)
   If Target.Column = J Then
        'If Yes, Determine if cell = Resolution Identified
       If IsError(Target.Value) Then
            b = True
        Else
            If Target.Value = "Resolution Identified" Then
                b = True
            Else
                b = False
            End If
        End If
        If b Then
            'If Yes, find next empty row in Sheet 1
           nxtRow = Sheets(1).Range("E" & Rows.Count).End(xlUp).Row + 1
            'Copy changed row and paste into Sheet 1
           Target.EntireRow.Copy _
            Destination:=Sheets(1).Range("A" & nxtRow)
        End If
    End If
End Sub
 
Last edited by a moderator:
Back
Top