delete cell

V

vikram

Hi

I need a macro which upon finding "=-" in a cell in column clears tha
cell, not delete , clears that cell.
thank
 
B

Bernie Deitrick

vikram,

For Column A:

Sub MacroForVikram()
Dim myCell As Range

Set myCell = Range("A:A").Find(What:="=-", _
LookIn:=xlFormulas, _
LookAt:=xlPart)
While Not myCell Is Nothing
myCell.ClearContents
Set myCell = Range("A:A").FindNext
Wend
End Sub

HTH,
Bernie
MS Excel MVP
 
Top