Yes, this works. I'm trying to understand it a little better,
though... I can see how it verifies that the height is in the
appropriate group, and then evaluates the age in the C-column range
via array position, but why the less than sign in C2<B range? What
does the "--" do exactly? Why does it evaluate to 0 for first place
(necessitating the 1)?
And what if I wanted to reverse the rank?
Sorry for the detail questions, but I have to apply this to some much
more complex criteria, and my hunting hasn't dug up a good explanatory
reference on sumproduct, array, and rank thus far.
Thanks for the help.
On Apr 12, 3:06 pm, Ron Coderre
wrote:
With your posted data list in A1:C7
Name Height Age Rank
Bill Short 55
Mary Short 45
Tom Tall 16
Rufus Short 21
Henrietta Tall 39
Henry Tall 38
Try this:
D2: =SUMPRODUCT(--(C2<($B$2:$B$7=B2)*$C$2:$C$7))+1
Copy that formula down through D7
Does that help?
***********
Regards,
Ron
XL2002, WinXP
" wrote:
I'm looking for a way to grab a rank in a single column where the set
of values ranked from--the second argument in the RANK wks function--
is conditional. Say I had this data
Name Height Age Rank
Bill Short 55 1
Mary Short 45 2
Tom Tall 16 3
Rufus Short 21 3
Henrietta Tall 39 1
Henry Tall 38 2
I want to be able to do this in a single-column, array-type formula:
IF(Height="Short",RankAgeAmongShortPeople,RankAgeA mongTallPeople)
Is this possible, or do I have to use several columns to get there?
(Chip's excellent page on ranking does not seem to cover this to me
http://www.cpearson.com/excel/rank.htm)
Thanks in advance.