This little macro will clear any cell that contains "sadness":
Sub MakeHappy()
Dim rr As Range, r As Range
Dim s As String, rClear As Range
Set rr = ActiveSheet.UsedRange
s = "sadness"
For Each r In rr
If InStr(r.Value, s) > 0 Then
If rClear Is Nothing Then
Set rClear = r
Else
Set rClear = Union(rClear, r)
End If
End If
Next
If rClear Is Nothing Then
Else
rClear.Clear
End If
End Sub
With the "found" dialog box open hit CTRL + a to select all "founds"
Edit>Delete or Edit>Clear Contents or your choice.
Gord Dibben MS Excel MVP
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.