My Objective is to look for the text G62 in Column G. If Column G has text G62 anywhere in the cell and the same row of Column W has data I’d like to copy that row of Column W and paste its contents into the same row of Column Z. The problem I am having is when I run my macro it does not produce the desired result nor do I receive an error message to indicate anything is wrong (the text G62 does exist in Column G and Column W has data). If you can help me solve my problem, thank you.
Sub Lookfortext()
Dim Column As Long
Dim Row As Long
Column = Cells(Rows.Count, "G").End(xlUp).Row
For Row = Column To 1 Step -1
If Cells(Row, "G").Text Like "G62*""" Then
If Application.CountA(Range(Cells(Row, "W"), _
Cells(Row, "W"))) = 1 Then
Cells(Row, "W").Copy Destination:=Cells(Row, "Z")
End If
End If
Next Row
End Sub
Bookmarks