View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Philip Philip is offline
external usenet poster
 
Posts: 156
Default Delete ROW if COLUMN = data

Hi,

Using the SpecialCells function you can delete all rows that match the
criteria #N/A ...

see Ron De Bruin's excellant site on this...

http://www.rondebruin.nl/specialcells.htm

HTH

Philip
"Steve" wrote:

Hi,

I am trying to stick the only manual part of my function in to my macro.

Once a load of data has been pasted in to a sheet, a formula in Column J
compares dumped data and returns the country code applicable, alternatively
it puts "---" if there is no code and a #N/A if it is not found.

I need to;
Delete all ROWs which have "---" in column J

Currently the manual way I do it is;
- Sort Ascending, so all data follows on.
- Filter on "---"
- Highlight ROW 1 to whatever, Delete Rows
- Repeat for #N/A

What would be good would be if I could automate this.
Autofilter, Custom Filter "---" OR "#N/A"
This now shows only what I want to delete, I want to delete all these rows
(leaving header information intact).
But it mustn't delete anything in between the filtered rows obviously!

HELP!!!