Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Allan T
 
Posts: n/a
Default How to create a ranked list

Hello

I have a scorecard for the Eurovision Song Contest tomorrow. This scores
24 countries (listed in A1:A24), giving each country a point score between 1
and 20 (points are in B1:B24).

I can use the rank function in column C to determine which country has come
first in the list (i.e. in C1, I put =rank(B1,$B$1:$B$24) and copy the
formula down to C24).

This then allows me to create a new list, with the countries in order from
who has scored most points to who has scored least. I do this by repeating
the countries in column D, and then in column F I use the formula
=vlookup(row(F1)-row($F$1)+1,$C$1:D$24,2,FALSE).

This works ok as long as two countries do not score the same number of
points. If this happens, then I get an "N/A" in this column. How do I get
around this? And can I make the formula further fool-proff so that if 3, 4,
5 or 6 countries score equal points, the formula doesn't fall over?

If 2 or more countries are tied, the order I would like Excel to return the
countries in could be either (i) the order in which the country appears in
the original list; or (ii) alphabetical.

Many Thanks for any help you can give me.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default How to create a ranked list

There are examples here

http://www.cpearson.com/excel/rank.htm


Regards,

Peo Sjoblom

"Allan T" wrote:

Hello

I have a scorecard for the Eurovision Song Contest tomorrow. This scores
24 countries (listed in A1:A24), giving each country a point score between 1
and 20 (points are in B1:B24).

I can use the rank function in column C to determine which country has come
first in the list (i.e. in C1, I put =rank(B1,$B$1:$B$24) and copy the
formula down to C24).

This then allows me to create a new list, with the countries in order from
who has scored most points to who has scored least. I do this by repeating
the countries in column D, and then in column F I use the formula
=vlookup(row(F1)-row($F$1)+1,$C$1:D$24,2,FALSE).

This works ok as long as two countries do not score the same number of
points. If this happens, then I get an "N/A" in this column. How do I get
around this? And can I make the formula further fool-proff so that if 3, 4,
5 or 6 countries score equal points, the formula doesn't fall over?

If 2 or more countries are tied, the order I would like Excel to return the
countries in could be either (i) the order in which the country appears in
the original list; or (ii) alphabetical.

Many Thanks for any help you can give me.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default How to create a ranked list

You might also wish to try this non-array formulas construct ..

With countries listed in A1:A24, points in B1:B24

Clear your existing col C first, then place:
In C1: =RANK(E1,$E$1:$E$24)
In D1: =INDEX(A:A,MATCH(LARGE($F:$F,ROW(A1)),$F:$F,0))
Copy D1 to E1
In F1: =IF(B1="","",B1-ROW()/10^10)
Select C1:F1, copy down to F24

Cols D & E will return a full descending sort of the 24 countries in col A,
sorted by their points in col B. Countries with tied scores, if any, will
appear in the same relative order that they are listed in col A. Col C
provides the ranking of the countries (Hide away the helper col F if necess).
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Allan T" wrote:
Hello

I have a scorecard for the Eurovision Song Contest tomorrow. This scores
24 countries (listed in A1:A24), giving each country a point score between 1
and 20 (points are in B1:B24).

I can use the rank function in column C to determine which country has come
first in the list (i.e. in C1, I put =rank(B1,$B$1:$B$24) and copy the
formula down to C24).

This then allows me to create a new list, with the countries in order from
who has scored most points to who has scored least. I do this by repeating
the countries in column D, and then in column F I use the formula
=vlookup(row(F1)-row($F$1)+1,$C$1:D$24,2,FALSE).

This works ok as long as two countries do not score the same number of
points. If this happens, then I get an "N/A" in this column. How do I get
around this? And can I make the formula further fool-proff so that if 3, 4,
5 or 6 countries score equal points, the formula doesn't fall over?

If 2 or more countries are tied, the order I would like Excel to return the
countries in could be either (i) the order in which the country appears in
the original list; or (ii) alphabetical.

Many Thanks for any help you can give me.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I create a list of items in a column? stepaim Excel Worksheet Functions 3 May 6th 06 07:07 PM
Trying to Create a Conditional Drop down list Noel Excel Worksheet Functions 6 July 26th 05 05:18 PM
How to create a Sub validation list in excel? Simon Excel Discussion (Misc queries) 1 July 13th 05 10:31 AM
How do I create a command from a list box Issuesinmonument Excel Discussion (Misc queries) 1 June 29th 05 12:26 PM
create a drop down list with the source from a different workbook Sampath Excel Discussion (Misc queries) 2 January 8th 05 07:57 PM


All times are GMT +1. The time now is 10:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"