View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Deleting Rows that Match/Contain Search Criteria



set rng = Columns("A:A").Find(What:="74RM",... )
if not rng is nothing then
rng.EntireRow.Delete
End if

--
Regards,
Tom Ogilvy


"Posse John" wrote:

I import data for an external source into Excel. I sort and format the data
programatically.

This data contains some information that I need to delete. Searching that
range by using the following:

Columns("A:A").Find(What:="74RM",... ).Activate

How do I delete the entire row when the search criteria is found? I'm also
having difficulty understanding how to trap the error that occurs when the
search critieria is not found.