Hi.
When the code tries pasting something i get this error message: "paste special method of range class failed".
Here's my code, see the red font....
Sub MATCH()
Dim B As String
Dim lr As Long
Dim rCell As Long
B = ActiveCell.Offset(0, -1).Value
lr = Range("D" & Rows.Count).End(xlUp).Row
For rCell = 2 To lr
If Range("D" & rCell).Value = B Then
Range("E" & rCell).Value = "INVOICE"
Range("K" & rCell).Value = "INV"
Range("F" & rCell).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
Next rCell
End Sub
Bookmarks