View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Herbert Seidenberg Herbert Seidenberg is offline
external usenet poster
 
Posts: 1,180
Default Ranking multiple columns by 1000th inch

Assume you have a 12x5 array of numbers named ArrayA (not shown),
and there are multiple 2 way ties and one 3 way tie.
Arrange the adjacent area like this:
aggs mins ranks dups corr rank_real
0.438 0.052 1 1 0 1
0.567 0.137 9 3 0 9
0.548 0.144 5 2 0 5
0.567 0.248 9 3 1 10
0.491 0.002 2 2 0 2
0.602 0.226 12 1 0 12
0.548 0.358 5 2 1 6
0.564 0.063 7 2 0 7
0.564 0.220 7 2 1 8
0.545 0.066 4 1 0 4
0.567 0.261 9 3 2 11
0.491 0.249 2 2 1 3
The formula for aggs, mins, ranks and dups, in R1C1 style, is:
=ROUND(AVERAGE(ArrayA R),3)
=MIN(ArrayA R)
=RANK(aggs,aggs,1)
=COUNTIF(ranks,ranks)
Into the first cell of corr, enter this array formula with
Cntrl+Shift+Enter:
=dups R-MATCH(mins R,LARGE((dups=dups R)*(ranks=ranks
R)*mins,{1;2;3}),0)
then copy it down with the fill handle.
The formula for rank_real is
=ranks+corr
For ties greater than 3, increase the {1;2;3} array.
Uncheck R1C1 to translate into A1 style.