View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default RANK doesn't work . . . I gotta know why

The short answer is that RANK doesn't handle arrays.

If you properly entered the formula as an array you'd get #VALUE! errors.

If you don't enter the formula as an array and its entered on the same row
as the data you're referencing it'll return a number which may or may not be
correct but the RANK formula doesn't make sense:

=RANK(BH5,IF(BF5=$BF$5:$BF$291,$BH$5:$BH$291))

BF5 does equal BF5 so BH5 is ranked against BH5:BH291

As you copy the formula down the column each instance of the IF logical test
will evaluate as TRUE:

BF6 does equal BF6 so BH6 is ranked against BH5:BH291
BF7 does equal BF7 so BH7 is ranked against BH5:BH291
BF8 does equal BF8 so BH8 is ranked against BH5:BH291
etc
etc

--
Biff
Microsoft Excel MVP


"Sheeloo" <Click above to get my email id wrote in message
...
RANK function DOES see all those non-matching values....

The array within RANK() consists of matching values and FALSE... as
pointed
by you... it gets and array of 287 elements instead of only matching
values
as expected by you.



"andy62" wrote:

I am using Ragdyer's solution to assign a rank based on score (col BH)
among
matching items (col BF):

=SUMPRODUCT(($BF$5:$BF$291=BF8)*(BH8<$BH$5:$BH$291 ))+1

But what's buggin me is why RANK is malfunctioning for this application:

=RANK(BH5,IF(BF5=$BF$5:$BF$291,$BH$5:$BH$291))

Instead of returning the rank of BH5 among only matching items (when all
the
terms in column BF match the current term), I am getting a RANK of the
items
as if there were no subarray produced by referencing column BF. The IF
statement seems to be producing an array of values (when BF matches) and
"FALSE" (when BF does not match). If the RANK function does not even see
all
those non-matching values, how could it be working (malfunctioning)?

Bueller? . . . Bueller?

TIA