View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Removing rows featuring certain words

If the word is a constant value in the cell (not produced by a formula) and
stands alone.

Word = "word to look for"
With Columns(5)
.Replace What:=Word, Replacement:="=NA()", _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
MatchCase:=False
.SpecialCells(xlCellTypeFormulas, xlErrors).EntireRow.Delete
End With

--
Regards,
Tom Ogilvy



"clane " wrote in message
...
Hello,

I am looking to remove all rows featuring a certain word in an active
sheet. the word is confined to a single colum. I would like to use a
macro to do this but if anyone can think of a way to do it short of
deleting each cell individually my self that would help too

thanks a million

Chuck


---
Message posted from http://www.ExcelForum.com/