PDA

View Full Version : Solved: Search for word and delete text



crmpicco
12-12-2005, 05:47 AM
I have a MS Excel spreadsheet.

Is there any code that will search for 'Instant Purchase' then clear that cell?

TIA.

Picco

http://vbaexpress.com/forum/images/smilies/beerchug.gif

Bob Phillips
12-12-2005, 05:50 AM
I have a MS Excel spreadsheet.

Is there any code that will search for 'Instant Purchase' then clear that cell?

TIA.

Picco

http://vbaexpress.com/forum/images/smilies/beerchug.gif


Dim cell As Range
Set cell = ActiveSheet.UsedRange.Find("Instant Purchase")
If Not cell Is Nothing Then
cell.ClearContents
End If