I am getting this error in one of my macros, the code is
Dim rdel1 As Range
Dim rdel2 As Range
Set rdel1 = Sheets("Sheet1").Range(A1:B100)
For Each rdel2 In rdel1.Cells
If rdel2.Value = "No item selected" Then
rdel2.Offset(1, 0).EntireRow.Delete
rdel2.EntireRow.Delete
rdel2.Address = rdel2.Offset(-1, 0) "Error in this line"
End If
Next rdel2
I want to change the address of redel2 by offset(-1,0)
. I know it dosen't look the right way to write it but I am unable to get the right syntax to change it. Can someone help! Please!