ORDINAL
Reference
Section titled “Reference”>> Reference, Discussion, & Example Applications:
Returns the ordinal for a given number.
Inputs:
Section titled “Inputs:”- ar : array of numbers
ORDINAL = LAMBDA(ar, IF( ar - INT(ar) <> 0, "#N/A", MAP( ar, 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" ) ) ) ) ) ));