I have a code that looks at sheet 1 and finds any row with the word END and cuts the full row and pastes it to sheet 2. How do I create a code instead to look at sheet 3 column c (loan number) and finds it in sheet 1 then cuts and pastes the full row to sheet 2. The loan numbers will be different each month. There is only about 20 accounts to lookup.
Can I copy this code and revise it for my needs or do you advise a better way?
Can I copy this code and revise it for my needs or do you advise a better way?
VBA Code:
Sub MoveRowBasedOnCellValue()
'delete End Items and copy to Notes tab
Dim xRg As Range
Dim xCell As Range
Dim i As Long
Dim J As Long
Dim K As Long
i = Worksheets("Installation wkg").UsedRange.Rows.Count
J = Worksheets("END_NO CHANGE LIST").UsedRange.Rows.Count
J = 1
Set xRg = Worksheets("Installation wkg").Range("w1:w" & i)
Application.ScreenUpdating = False
For K = 1 To xRg.Count
If CStr(xRg(K).Value) = "END" Then
xRg(K).EntireRow.Cut Destination:=Worksheets("END_NO CHANGE LIST").Range("a" & J + 1)
J = J + 1
End If
Next
Application.ScreenUpdating = True
End Sub