Clear cells in Column D if not = Auto
Sub ClearAuto()
'Clear all cells with the value "Auto"
Dim i as Integer
Dim ItemCount as Integer
ItemCount = Application.WorksheetFunction.CountA(Columns("B"))
Range("B1").Select
For i = 1 to ItemCount
If ActiveCell.Value = "Auto" then ActiveCell.ClearContents
ActiveCell.Offset(1,0).Select
Next i
End Sub
"JOUIOUI" wrote:
D have a spreadsheet and I want to clear all cells in Column B that is not
equal to Auto. Any help is certainly appreciated. Thanks
|