View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Ranking by MS-Excel Function

Hi Ivan,

Am Sat, 24 Jan 2015 01:13:24 -0800 (PST) schrieb Ivan Peeler:

{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.


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?


if column A is sorted ascending try in B1:
=RANK(A1,$A$1:$A$33,1)
and in B2:
=IF(A2=A1,B1,B1+1)
and copy down

Is column A sorted descending try in B1:
=RANK(A1,$A$1:$A$33,0)


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional