I have the below code which deletes the row in SheetM if a match is found. But I want to alter it so that if it finds a match in sheetLW then I want it to copy what is in col F,G,H in sheetLW and paste into sheetM col H,I and J.
Sub Alter()
Dim rsht1 As Long, rsht2 As Long
rsht1 = Sheets("SheetM").Range("A" & Rows.Count).End(xlUp).Row
rsht2 = Sheets("SheetLW").Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To rsht1
For j = 1 To rsht2
If Sheets("SheetM").Range("B" & i) = Sheets("SheetLW").Range("C" & j) Then
Sheets("SheetM").Rows(i).Select
Selection.Delete Shift:=xlUp
End If
Next
Next
End Sub
Bookmarks