Thread: DELETING CELS
View Single Post
  #3   Report Post  
Max
 
Posts: n/a
Default

"Chris" wrote:
( with all caps converted )
I have a list of some 20,000 names.
Several of the names are listed more than
once. I need to delete the ones that are listed
less than 10 times.
how do i do that?


As it stands*, one play ..

Assuming the names are listed in A1:A20000

Put in B1:
=IF(A1="","",IF(COUNTIF($A$1:A1,A1)<10,"",ROW()))

Put in C1:
=IF(ISERROR(SMALL(B:B,ROWS($A$1:A1))),"",INDEX(A:A ,MATCH(SMALL(B:B,ROWS($A$1
:A1)),B:B,0)))

Select B1:C1, fill down to C20000

Col C will return the residual list that you're after,
with all the results neatly bunched at the top

*I'm not sure whether you have a typo in the line:
.. delete the ones that are listed
less than 10 times.


If however what you really want? is to extract
the list of unique names in col A,
just replace the formula in B1 above with:

=IF(A1="","",IF(COUNTIF($A$1:A1,A1)1,"",ROW()))

(Formula in C1, and rest of the steps unchanged)

Btw, please remove the caps lock when you type your post.
All caps is awfully tough to read and is considered impolite ..
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--