excel get ordinal number code example
Example: excel vba get ordinal number from cardinal number
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