View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Delete all rows except

Hi Marilyn

See
http://www.rondebruin.nl/delete.htm

You can use this example from the site in the macro

Replace
If .Value = "ron" Then .EntireRow.Delete

With

If IsError(Application.Match(.Value, _
Array(15, 16, 18), 0)) Then .EntireRow.Delete

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Marilyn" wrote in message ...
Hello ( Excel 2002)My worksheet has about 3900 rows. I need to delete all
rows that do not have the following numbers
15,16,18,21,23,40,106,108,110,114,(there is a total of 34 different numbers)
These numbers are found in column A. also I do not want to delete row 1
that has the titles. I need a macro because I have over 100 files . Help
and Thanks