lrobbo314
Well-known Member
- Joined
- Jul 14, 2008
- Messages
- 3,957
- Office Version
- 365
- Platform
- Windows
ORDINAL returns the ordinal for a given number. e.g.
1 -> 1st
2 -> 2nd
etc.
1 -> 1st
2 -> 2nd
etc.
ORDINAL | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | 1st | 2nd | 3rd | 4th | 5th | 6th | 7th | 8th | 9th | 10th | ||
2 | 11th | 12th | 13th | 14th | 15th | 16th | 17th | 18th | 19th | 20th | ||
3 | 21st | 22nd | 23rd | 24th | 25th | 26th | 27th | 28th | 29th | 30th | ||
4 | 31st | 32nd | 33rd | 34th | 35th | 36th | 37th | 38th | 39th | 40th | ||
5 | 41st | 42nd | 43rd | 44th | 45th | 46th | 47th | 48th | 49th | 50th | ||
6 | 51st | 52nd | 53rd | 54th | 55th | 56th | 57th | 58th | 59th | 60th | ||
7 | 61st | 62nd | 63rd | 64th | 65th | 66th | 67th | 68th | 69th | 70th | ||
8 | 71st | 72nd | 73rd | 74th | 75th | 76th | 77th | 78th | 79th | 80th | ||
9 | 81st | 82nd | 83rd | 84th | 85th | 86th | 87th | 88th | 89th | 90th | ||
10 | 91st | 92nd | 93rd | 94th | 95th | 96th | 97th | 98th | 99th | 100th | ||
11 | ||||||||||||
12 | Not an integer | |||||||||||
13 | #N/A | |||||||||||
Sheet6 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
A1:J10 | A1 | =ORDINAL(SEQUENCE(10,10)) |
A13 | A13 | =ORDINAL(1.5) |
Dynamic array formulas. |
Excel Formula:
=LAMBDA(number,
IF(number-INT(number)<>0,
"#N/A",
MAP(number,
LAMBDA(n,
LET(x,
INT(RIGHT(n,2)),
n & IF(OR(x=11,x=12,x=13),"th",IFERROR(CHOOSE(RIGHT(x),"st","nd","rd"),"th"))
)
)
)
)
)
Upvote
0