View Single Post
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

djhs,

The typical code to do that is:

On Error Resume Next
Columns("D:D").AutoFilter Field:=1, Criteria1:="DONCASTER"
Range("D2:D65536").SpecialCells(xlCellTypeVisible) .EntireRow.Delete

Repeat the two lines above for each condition, then use the line

Columns("D:D").AutoFilter Field:=1

to turn off the filter, and your macro is done.

HTH,
Bernie
MS Excel MVP

"djhs63" wrote in message
...
I want to record a macro to delete all rows in a worksheet where a

specified
column entry matches a condition (e.g. "where column D=DONCASTER or LEEDS

or
HALIFAX")