Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 01-08-2005, 10:06 PM
JohnT
Guest
 
Posts: n/a
1st, 2nd, 3rd Place etc.....

Please Register to Remove these Ads

I have an idea how to do this but it requires a series of
nested ifs and i'm sure there is a better way......in
column A i have a list of names, column B is their scores
and in C i would like to rank them in 1st, 2nd, 3rd etc....
any ideas????

(thanks in advance)
Reply With Quote
  #2  
Old 01-08-2005, 10:34 PM
duane duane is offline
Forum Guru
 
Join Date: 11 Jul 2004
Posts: 847
duane is becoming part of the community
see Rank function: for rank of column b

=rank(b1,b1:b100,0)

ranks highest to lowest

change ,0 to , 1 for lowest to highest
__________________
not a professional, just trying to assist.....
Reply With Quote
  #3  
Old 01-08-2005, 11:07 PM
William
Guest
 
Posts: n/a
Re: 1st, 2nd, 3rd Place etc.....

Hi John

Have a look at Excel's "RANK" formula
eg =RANK(B1,B1:B25,1)


--
XL2002
Regards

William

willwest22@yahoo.com

"JohnT" <anonymous@discussions.microsoft.com> wrote in message
news:15d101c4f5f7$2a234be0$a401280a@phx.gbl...
| I have an idea how to do this but it requires a series of
| nested ifs and i'm sure there is a better way......in
| column A i have a list of names, column B is their scores
| and in C i would like to rank them in 1st, 2nd, 3rd etc....
| any ideas????
|
| (thanks in advance)



Reply With Quote
  #4  
Old 01-09-2005, 05:06 AM
Aladin Akyurek
Guest
 
Posts: n/a
Re: 1st, 2nd, 3rd Place etc.....

I suspect that you want to create a Top N list, with N set to 3...

Let A2:B9 house, including the labels Name and Score:

{"Name","Score";
"dawn",23;
"damon",23;
"bob",25;
"chris",22;
"christine",25;
"ian",32;"john",35}

The foregoing just shows sample records, where each record consists of a
row of two cells.

In C2 enter & copy down:

=RANK(B3,$B$3:$B$9)+COUNTIF($B$3:B3,B3)-1

This calculates a unique rank based on the scores.

In D1 enter: 3

which indicates that you want a Top 3 list.

In D2 enter: Top N

which is just a label.

In D3 enter & copy down:

=IF(ROW()-ROW(D$3)+1<=$D$1+$E$1,INDEX($A$3:$A$9,MATCH(ROW()-ROW(D$3)+1,$C$3:$C$9,0)),"")

This builds a Top N list of names. Note that this formula refers to $E$1
that houses a formula.

E1:

=MAX(IF(INDEX(B3:B9,MATCH(D1,C3:C9,0))=B3:B9,C3:C9))-D1

which must be confirmed with control+shift+enter instead of just usual
enter.

This formula calculates the ties of the Nth (3rd) value itself.

In E2 enter: Associated Score

which is just a label.

In E3 enter & copy down:

=IF(D3<>"",INDEX($B$3:$B$9,MATCH(ROW()-ROW(E$3)+1,$C$3:$C$9,0)),"")

The results are for the sample data are:

{"john",35;
"ian",32;
"bob",25;
"christine",25}

JohnT wrote:
> I have an idea how to do this but it requires a series of
> nested ifs and i'm sure there is a better way......in
> column A i have a list of names, column B is their scores
> and in C i would like to rank them in 1st, 2nd, 3rd etc....
> any ideas????
>
> (thanks in advance)

Reply With Quote
  #5  
Old 01-09-2005, 05:06 AM
Ragdyer
Guest
 
Posts: n/a
Re: 1st, 2nd, 3rd Place etc.....

Be careful !

That third argument ( ,1 ) *may* not be necessary.

=RANK(B1,$B$1:$B$25)
Will rank the *highest* score as number "1".

=RANK(B1,$B$1:$B$25,1)
Will rank the *lowest* score as number "1" (golf).
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"William" <willwest22@yahoo.com> wrote in message
news:ufSpEif9EHA.3828@TK2MSFTNGP09.phx.gbl...
> Hi John
>
> Have a look at Excel's "RANK" formula
> eg =RANK(B1,B1:B25,1)
>
>
> --
> XL2002
> Regards
>
> William
>
> willwest22@yahoo.com
>
> "JohnT" <anonymous@discussions.microsoft.com> wrote in message
> news:15d101c4f5f7$2a234be0$a401280a@phx.gbl...
> | I have an idea how to do this but it requires a series of
> | nested ifs and i'm sure there is a better way......in
> | column A i have a list of names, column B is their scores
> | and in C i would like to rank them in 1st, 2nd, 3rd etc....
> | any ideas????
> |
> | (thanks in advance)
>
>
>


Reply With Quote
  #6  
Old 01-09-2005, 05:06 AM
Ragdyer
Guest
 
Posts: n/a
Re: 1st, 2nd, 3rd Place etc.....

I think you missed the "etc ...", Aladin.<bg>
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Aladin Akyurek" <akyurek@xs4all.nl> wrote in message
news:41E0FE12.3040802@xs4all.nl...
> I suspect that you want to create a Top N list, with N set to 3...
>
> Let A2:B9 house, including the labels Name and Score:
>
> {"Name","Score";
> "dawn",23;
> "damon",23;
> "bob",25;
> "chris",22;
> "christine",25;
> "ian",32;"john",35}
>
> The foregoing just shows sample records, where each record consists of a
> row of two cells.
>
> In C2 enter & copy down:
>
> =RANK(B3,$B$3:$B$9)+COUNTIF($B$3:B3,B3)-1
>
> This calculates a unique rank based on the scores.
>
> In D1 enter: 3
>
> which indicates that you want a Top 3 list.
>
> In D2 enter: Top N
>
> which is just a label.
>
> In D3 enter & copy down:
>
>

=IF(ROW()-ROW(D$3)+1<=$D$1+$E$1,INDEX($A$3:$A$9,MATCH(ROW()-ROW(D$3)+1,$C$3:
$C$9,0)),"")
>
> This builds a Top N list of names. Note that this formula refers to $E$1
> that houses a formula.
>
> E1:
>
> =MAX(IF(INDEX(B3:B9,MATCH(D1,C3:C9,0))=B3:B9,C3:C9))-D1
>
> which must be confirmed with control+shift+enter instead of just usual
> enter.
>
> This formula calculates the ties of the Nth (3rd) value itself.
>
> In E2 enter: Associated Score
>
> which is just a label.
>
> In E3 enter & copy down:
>
> =IF(D3<>"",INDEX($B$3:$B$9,MATCH(ROW()-ROW(E$3)+1,$C$3:$C$9,0)),"")
>
> The results are for the sample data are:
>
> {"john",35;
> "ian",32;
> "bob",25;
> "christine",25}
>
> JohnT wrote:
> > I have an idea how to do this but it requires a series of
> > nested ifs and i'm sure there is a better way......in
> > column A i have a list of names, column B is their scores
> > and in C i would like to rank them in 1st, 2nd, 3rd etc....
> > any ideas????
> >
> > (thanks in advance)


Reply With Quote
  #7  
Old 01-09-2005, 06:07 AM
Aladin Akyurek
Guest
 
Posts: n/a
Re: 1st, 2nd, 3rd Place etc.....

I don't think so...

In cell D1, the N of Top N can be set to any desired value the data
admits. <bg>

Ragdyer wrote:
> I think you missed the "etc ...", Aladin.<bg>

Reply With Quote
  #8  
Old 01-09-2005, 06:07 AM
Bob Phillips
Guest
 
Posts: n/a
Re: 1st, 2nd, 3rd Place etc.....

Take a look at http://www.xldynamic.com/source/xld.RANK.html

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JohnT" <anonymous@discussions.microsoft.com> wrote in message
news:15d101c4f5f7$2a234be0$a401280a@phx.gbl...
> I have an idea how to do this but it requires a series of
> nested ifs and i'm sure there is a better way......in
> column A i have a list of names, column B is their scores
> and in C i would like to rank them in 1st, 2nd, 3rd etc....
> any ideas????
>
> (thanks in advance)



Reply With Quote
  #9  
Old 01-09-2005, 09:06 AM
Ola
Guest
 
Posts: n/a
RE: 1st, 2nd, 3rd Place etc.....

Hi,

IF your wish to separate by Gender (Male/Female).

Name....Gender....Value....Rank
D4: =SUM((B4=$B$4:$B$100)*(C4>$C$4:$C$100))
Confirm the formula with Ctrl+Shift+Enter not just Enter.

Conditional Formatting can give you two colors.
(To be incl. in the suggestions above.)

Ola
Reply With Quote
  #10  
Old 01-12-2005, 09:52 AM
Ronald Hooper Ronald Hooper is offline
Registered User
 
Join Date: 12 Jan 2005
Posts: 9
Ronald Hooper is becoming part of the community
I found Aladin Akyurek's formula very helpful, but Ola (?) suggestion sounds like what I really need although I don't understand quite what needs to be done.

I need to sort a table on the fly to determine 1st, 2nd, 3rd, etc. places, but by cub scout den, ie, Tiger Cub, Wolf, Bear, Webelo. I don't need the "st" etc solution suggested by Bob Phillips. This is need for a Pinewood Derby scoresheet.

The columns would be:

Car # ........ Name ........ Den ........ Rank
1 bob bear 58
2 ron cub 17
3 dave bear 60
4 bill bear 35
5 dakota cub 55
etc

Thanks for any ideas.

Ron

PS I will also post this as a new tread.
Reply With Quote
  #11  
Old 01-12-2005, 07:53 PM
Ronald Hooper Ronald Hooper is offline
Registered User
 
Join Date: 12 Jan 2005
Posts: 9
Ronald Hooper is becoming part of the community
Smile Many Thanks

Many Thanks to Aladin Akyurek for his solution and to Henrik for correctly asking his question in a more recent thread <Rank() based on category>!!!!!

Aladin's answer was just what I needed. All I had to do was change "<" to ">" to rank from high value to low value by category. He also corrected, as I see it, the formula put forth by Ola (?) by included "+1".

Again, thanks!
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Forum Jump