I have a large spreadsheet 60 columns by up to 20,000 rows. I wish to
delete all rows where a specific value does not appear in one column.

In the past I have used a loop that reads all the rows from last to first,
deleting the entire row when the value in the column does not meet the
criteria. This works great except for large files - where it is very slow.

I had thought about sorting the file and then deleting those groups of
records where the criteria is not being met but this requires extra code to
identifier each part of the file to be removed.

Another idea was to use autofilters, where the negated criteria selection
allows me to delete all visible rows.

Any ideas as to the best and fastest method, without having to trawl through
all the data, row by row?


--
Cheers
Nigel