Excel Vba Get Ordinal Number From Cardinal Number

[Solved] Excel Vba Get Ordinal Number From Cardinal Number | Vb - Code Explorer | yomemimo.com
Question : excel vba get ordinal number from cardinal number

Answered by : daniel-ferry

Function Ordinal(n) Ordinal = n & Evaluate("IF(OR(--RIGHT(" & n & ",2)={11,12,13}),""th"",IFERROR(CHOOSE(RIGHT(" & n & "),""st"",""nd"",""rd""),""th""))")
End Function

Source : https://stackoverflow.com/a/60731953/3566998 | Last Update : Wed, 01 Apr 20

Answers related to excel vba get ordinal number from cardinal number

Code Explorer Popular Question For Vb