Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default Unique Rank with Duplicate Entries

Hi,

I have a question about a slightly complicated Rank function I want to
write, and Im having a problem with it. Say you have the following data:

Bob
Jim
Bob
Dan
Bill
Jim
Bob
Matt
Bob
Jim
Dan
Matt
Greg

I want to make a list that ranks these entries in order of how often they
appear, and that takes into account ties. Like so:

Bob (4)
Jim (3)
Matt (2)
Dan (2)
Greg (1)
Bill (1)

Does anyone have any ideas? Ive come close using CountIf and Unique Ranks,
but I cant figure out how to resolve the problem of having the same names
occur more than once. I also want to do this with as few helper columns as
possible.

Thanks,

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Unique Rank with Duplicate Entries

In B1 enter the array formula:
=IF(COUNTIF($A$1:A1,A1)=1,A1,"") and copy down
In C1 enter the normal formula:
=IF(B1="","",COUNTIF(A:A,B1)) and copy down


You should see:

Bob Bob 4
Jim Jim 3
Bob
Dan Dan 2
Bill Bill 1
Jim
Bob
Matt Matt 2
Bob
Jim
Dan
Matt
Greg Greg 1

just ignore the blank rows.
--
Gary''s Student - gsnu201001


"Demosthenes" wrote:

Hi,

I have a question about a slightly complicated Rank function I want to
write, and Im having a problem with it. Say you have the following data:

Bob
Jim
Bob
Dan
Bill
Jim
Bob
Matt
Bob
Jim
Dan
Matt
Greg

I want to make a list that ranks these entries in order of how often they
appear, and that takes into account ties. Like so:

Bob (4)
Jim (3)
Matt (2)
Dan (2)
Greg (1)
Bill (1)

Does anyone have any ideas? Ive come close using CountIf and Unique Ranks,
but I cant figure out how to resolve the problem of having the same names
occur more than once. I also want to do this with as few helper columns as
possible.

Thanks,

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unique Rank with Duplicate Entries Demosthenes Excel Worksheet Functions 6 March 30th 10 07:13 PM
Unique Rank with Duplicate Entries Demosthenes Excel Worksheet Functions 3 March 30th 10 06:09 PM
duplicate rank issue Russler Excel Discussion (Misc queries) 2 August 24th 09 05:26 PM
RANK, duplicate ranking but no gaps in rank arron laing Excel Worksheet Functions 4 June 14th 06 07:57 AM
count duplicate (or, inversely, unique) entries, but based on a condition markx Excel Worksheet Functions 3 March 8th 05 07:57 PM


All times are GMT +1. The time now is 12:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"