I'm trying to use a For Each macro to erase dates in a range that are greater than Today. The range is C3 and D3 to Lr (I have Lr set earlier in the macro and it works other places for the same purpose). I keep getting an invalid range when I use:
But if I replace the range with "ws2.range("C:C")", it works for that range.
I'm probably making a very rookie mistake. Greatly appreciate any help. Also, I'm very open to alternative methods of accomplishing the same idea if someone has a better method.
Code:
Dim c As Range
For Each c In ws2.range("C3:D" & Lr)
If c.value > Today Then
c.value = ""
Else
End If
Next
But if I replace the range with "ws2.range("C:C")", it works for that range.
I'm probably making a very rookie mistake. Greatly appreciate any help. Also, I'm very open to alternative methods of accomplishing the same idea if someone has a better method.