Hi
I am writing a code that looks through a range and looks for values that contain "ADR".
The range i am using is Range("D" & i).Select
My question is: How can i replace "D" with a counter or a variable, so that when it is done with column D it will move to the next column.
My code below.
endrange = Range("A65000").End(xlUp).Row
For i = 1 To endrange
mycheck = Range("d" & i).Value Like "*ADR*"
If mycheck = True Then
Range("D" & i).Select
Selection.Delete Shift:=xlToLeft
End If
Next i
Thanks
I am writing a code that looks through a range and looks for values that contain "ADR".
The range i am using is Range("D" & i).Select
My question is: How can i replace "D" with a counter or a variable, so that when it is done with column D it will move to the next column.
My code below.
endrange = Range("A65000").End(xlUp).Row
For i = 1 To endrange
mycheck = Range("d" & i).Value Like "*ADR*"
If mycheck = True Then
Range("D" & i).Select
Selection.Delete Shift:=xlToLeft
End If
Next i
Thanks