View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ivan Peeler Ivan Peeler is offline
external usenet poster
 
Posts: 2
Default Ranking by MS-Excel Function

Dear Sir,

Ranking by MS-Excel Function

There is an array of figures shown as follows:
{1;1;1;4;4;4;8;8;8;8;8;8;13;13;13;16;16;16;20;20;2 0;22;22;25;25;27;27;27;27;30;30;30;30}

Say, the array is located at A1:A33.
Admittedly, the array has been subject to Data Sort.
Hopefully, it will well behave and offer clarity.
________________________________________
Would like to rank the figures such that,
1 (by virtue of the leading appearance) will be ranked 1 (quite obviously).
4 (where there are 3 instances) will (all) be ranked 2.
However, by applying Excel function, Rank (4, Array) gives 4.
Reason being that, duplication of the 1's at the forefront has given rise to,
Rank (1, 2nd appearance) yields 2.
Rank (1, 3rd appearance) yields 3.
________________________________________
Further requirement is to rank (8's) as 3; rank (13's) as 4 and rank (16's) as 5.
Last but not least, rank (30's) should be 10.
________________________________________
Please devise a formula to rank each element of the given array such that
the figures will be evaluated individually as per requirement (given above).

What if, the array is then rearranged with figures in any other order,
will the formula hold true still?

Please share your experience and results. Regards.
________________________________________