View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
scubadiver scubadiver is offline
external usenet poster
 
Posts: 55
Default find text within string and then delete


thanks.

I didn't need all the code but it helped.

"Mike H" wrote:

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.