I would like to understand why PasteSpecial doesn't work with this code.
I'm trying to copy every cell that has the same date of the cell J3 to a new position and then clear the old data. The idea of End(xlDown).Offset(1) is to avoid overwriting but its doens't seem to work.
If I click on debug I get -4121 and I can't understand what does it mean
Sub update()
Dim x As Integer
For x = 22 To 36
If Cells(x, 4).Value = Cells(3, 10).Value Then
Cells(x, 5).Copy
Cells(3, 10).End(xlDown).Offset(1).PasteSpecial
Cells(x, 4).ClearContents
Cells(x, 5).ClearContents
End If
Next x
End Sub