View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mark mark is offline
external usenet poster
 
Posts: 196
Default More efficient than copying and pasting

Yep. Your suggestion would work, too... the efficiency
lies in how many outliers there are.

Personally, I just have a 'del_rows' subroutine in my
callable utilities module... just call the subroutine with
whatever the current Boolean formula is, and the
subroutine goes through deleting any rows that meet that
criteria.

Because of the way Excel sorts work, most often, the data
comes back in the same sort order as it was originally,
just missing the deleted data, as desired.

Sometimes, if there's something else involved, I put in an
index as you mentioned... and yes, that would be a good
way to identify which line in the original sample that the
row came from.


-----Original Message-----
Good point. Might be worth considering sorting the data

from highest to
lowest values and then reading and copying the data until

the value falls
below the limit, then sort in reverse order (low to high)

and do the same
reading and copying until the value exceeds the lower

limit.