I am trying to get the following code to delete cells if the cell in column A has a certain value and the cell next to it in column B is equal to 0.75, but it is not working properly
Any ideas?
Sub Deleter1()
LastRow = Range("A65536").End(xlUp).Row
For x = LastRow To 1 Step -1
If Range("A" & x).Value = "Test" And Range("B" & x).Value = 0.75 Then _
Range("A" & x).Select
Selection.ClearContents
Range("B" & x).Select
Selection.ClearContents
Next x
End Sub
Any ideas?
Sub Deleter1()
LastRow = Range("A65536").End(xlUp).Row
For x = LastRow To 1 Step -1
If Range("A" & x).Value = "Test" And Range("B" & x).Value = 0.75 Then _
Range("A" & x).Select
Selection.ClearContents
Range("B" & x).Select
Selection.ClearContents
Next x
End Sub