I am using excel 2000
Is it possible to format numbers to be 1st, 2nd etc
I am using excel 2000
Is it possible to format numbers to be 1st, 2nd etc
Paul
Don't think you can without code which would change the cell value.
Here's some links and a formula.
http://www.cpearson.com/excel/ordinal.htm
http://www.mvps.org/dmcritchie/excel...me.htm#ordinal
http://xldynamic.com/source/xld.RANK.html
VBA Noob=A1&CHOOSE((A1<>{11,12,13})*MIN(4,MOD(A1,10))+1,"th","st","nd","rd","th")
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
Thanks for the linksOriginally Posted by VBA Noob
You actually need an AND function in there, otherwise it won't work correctly for 12 and 13, i.e.Originally Posted by VBA Noob
=A1&CHOOSE(AND(A1<>{11,12,13})*MIN(4,MOD(A1,10))+1,"th","st","nd","rd","th")
Also, if your numbers might be as high as 111 you need a MOD function too....so to cover all possible numbers
=A1&CHOOSE(AND(MOD(A1,100)<>{11,12,13})*MIN(4,MOD(A1,10))+1,"th","st","nd","rd","th")
Edit: just so that I can find this thread again if I search....."ordinal numbers"
Last edited by daddylonglegs; 07-13-2008 at 08:33 AM.
Thanks daddylonglegsOriginally Posted by daddylonglegs
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks