#1   Report Post  
Paul
 
Posts: n/a
Default CHOOSE Function

Hi,
I'm using this to return '1st' '2nd' '3rd' etc
=CHOOSE(RANK(H5,$H$5:$H$14),"st","nd","rd","th")
(This is part of a longer formula)
This works OK up to 4th, if the rank is more than 4 it
returns an error.
The ranking goes up to 10th. My question is, is there a
way to get any rank above 4 to return 'th' other than
entering 'th' 7 times in the formula?
TIA
Paul
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

One way:

=CHOOSE(IF(RANK(H5,$H$5:$H$14)4,4,RANK
(H5,$H$5:$H$14)),"st","nd","rd","th")

HTH
Jason
Atlanta, GA

-----Original Message-----
Hi,
I'm using this to return '1st' '2nd' '3rd' etc
=CHOOSE(RANK(H5,$H$5:$H$14),"st","nd","rd","th" )
(This is part of a longer formula)
This works OK up to 4th, if the rank is more than 4 it
returns an error.
The ranking goes up to 10th. My question is, is there a
way to get any rank above 4 to return 'th' other than
entering 'th' 7 times in the formula?
TIA
Paul
.

  #3   Report Post  
Avner
 
Posts: n/a
Default


You can try

=IF(RANK(H5,$H$5:$H$14)3,"th",CHOOSE(RANK(H5,$H$5 :$H$14),"st","nd","rd"))


Avner


--
Avner
------------------------------------------------------------------------
Avner's Profile: http://www.excelforum.com/member.php...fo&userid=5078
View this thread: http://www.excelforum.com/showthread...hreadid=274515

  #4   Report Post  
Alan
 
Posts: n/a
Default

Jason and Avner,
Of course! Woods and trees! Thank you both very much,
Regards,
Paul (Using a friends machine)
"Avner" wrote in message
...

You can try

=IF(RANK(H5,$H$5:$H$14)3,"th",CHOOSE(RANK(H5,$H$5 :$H$14),"st","nd","rd"))


Avner


--
Avner
------------------------------------------------------------------------
Avner's Profile:
http://www.excelforum.com/member.php...fo&userid=5078
View this thread: http://www.excelforum.com/showthread...hreadid=274515



  #5   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

=CHOOSE(MIN(RANK(H5,$H$5:$H$14),4),"st","nd","rd", "th")


Arvi Laanemets


"Paul" wrote in message
...
Hi,
I'm using this to return '1st' '2nd' '3rd' etc
=CHOOSE(RANK(H5,$H$5:$H$14),"st","nd","rd","th")
(This is part of a longer formula)
This works OK up to 4th, if the rank is more than 4 it
returns an error.
The ranking goes up to 10th. My question is, is there a
way to get any rank above 4 to return 'th' other than
entering 'th' 7 times in the formula?
TIA
Paul



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
Averaging function Sarah Excel Discussion (Misc queries) 0 January 18th 05 05:09 PM
Function in XL or in VBA for XL that pulls numeric digits from a t Nate Oliver Excel Discussion (Misc queries) 0 December 14th 04 05:57 PM
I cant use englisch function names in a swedich version of excel PE Excel Discussion (Misc queries) 2 December 7th 04 02:00 AM
need to save values from a function before it changes Ron Excel Worksheet Functions 1 October 29th 04 06:29 AM
SUMIF(AND) FUNCTION Saariko Excel Worksheet Functions 9 October 28th 04 11:52 AM


All times are GMT +1. The time now is 09:50 PM.

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

About Us

"It's about Microsoft Excel"