find text within string and then delete
Hi,
This works on column A. Right click your sheet tab, View code and paste this
in and run it.
Sub stance()
Dim MyRange As Range
Lastrow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
Set MyRange = Range("A1:A" & Lastrow)
For Each c In MyRange
If InStr(1, UCase(c.Value), "REPORT") Then
c.ClearContents
End If
Next
End Sub
Mike
"scubadiver" wrote:
I want to look for the word 'report' within a larger text string and then
delete all the text in the cell.
|