View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default Conditional Rank

iperlovsky wrote...
Thanks, that is a clean way of getting there. How would I incorporate a
"correction factor" for tied ranks?

....

If you don't need to worry about being sued for arbitrary ordering of
ties, use their original entry order. If all cells in Calls!B1:B1000
contain numbers, try

=SUMPRODUCT((Calls!$A$1:Calls!$A$1000=Calls!A100)
*(Calls!$B$1:$B$1000-ROW(Calls!$B$1:$B$1000)/1E9=Calls!B100-ROW(Calls!
B100)/1E9))

Adjust the 1E9 (Excel converts this to 1000000000) figure as
necessary. It should be large enough so that the row correction term
is smaller in absolute value than MIN(Calls!$B$1:$B$1000) but not so
large that it would be discarded due to Excel's 15 decimal digit
precision. For example, if 1000000000 were one of the values in Calls!
B1:B1000 and you try to add 1/1000000000 = 0.000000001 to it, the
value would remain 1000000000 since 1000000000.000000001 would require
19 decimal digits.

If there could be nonnumeric values in Calls!B1:B1000, you'll need to
use an array formula like

=SUM((Calls!$A$1:Calls!$A$1000=Calls!A100)*IF(ISNU MBER(Calls!$B$1:$B
$1000),
Calls!$B$1:$B$1000-ROW(Calls!$B$1:$B$1000)/1E9=Calls!B100-ROW(Calls!
B100)/1E9))