View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Top 10 for each Item in column

sort on Country code and amount (descending)

in an adjacent column (Assume in C2) put in a formula like

=Countif($A$2:A2,A2)

then drag fill down the column by all your data.

Now do a custom autofilter on this column for Less than 11

Copy to another sheet if you wish. This doesn't have any special handling
for ties, especially ties at the 10th highest boundary ( for example if one
country had 12 entries with the highest value as a simple example - only 10
would be shown).

--
Regards,
Tom Ogilvy


"Tod" wrote in message
...
I've been trying to do this with autofilter, but I think
now it's going to require greater thinkers than I.

I have two columns. The first is a list of country codes.
The second is amounts. There are many, many amounts and
so there are also many, many instances of country codes.
What I want to know is the top 10 highest amounts for
each country code. So if this is the list:

Country Code Amount
UK 123
US 22
FR 225
BE 101
IT 200
UK 15
UK 3
UK 112
IT 125
BE 234
BE 256
IT 751
FR 52
FR 68
FR 85
FR 885
......etc

This list goes on for about 15,000 rows. I want to find
out the top 10 highest Amount for each Country Code. How
could I do that?

tod