chiacheng.teg wrote:Tried the formula above but I have 11st in my data. Lol.
On Friday, February 13, 2009 at 5:10:01 AM UTC+8, Bob Arnett wrote:Did you not notice that the original post was ***NINE FUCKING YEARS AGO***?! Fucking Google Groupies. I wish Google would disable replies after a few days of no activity.
Is there any way to display numbers in the mode of:
1st
2nd
3rd
4th
etc. ?
Or a primitive but simple solution that works:
=day&vlookup(day,vlookup_table,2,false)A solution that doesn't require manual entry of every number in existence:
=A1&IF(OR(AND(A1>3,A1<21),A1=0),"th",VLOOKUP(MOD(A1,10),vlookup_table,2))
...which only requires a 5-line lookup table:
1 st
2 nd
3 rd
4 th
* th
...or, you know, the shorter and much better solution provided by Rick Rothstein 16 minutes after the original post -- again, ***NINE YEARS AGO***: =A1&MID("thstndrdth",MIN(9,2*RIGHT(A1)*(MOD(A1-11,100)>2)+1),2)
--
You think you have won. We shall see about that.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 02:08:48 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,581 |