IF statements in Macros

  • Thread starter Thread starter Farley Granger
  • Start date Start date
F

Farley Granger

In a Macro I want to put a blank in a cell if that cell contains the word
"All"
Can someone tell me how to do that?
Thanks
 
Farley

Sub All_Gone()
For Each cel In Selection
If cel.Value = "All" Then
cel.Value = ""
'or cel.ClearContents
End If
Next
End Sub

Gord Dibben Excel MVP
 
Back
Top