I voluntarily did not take the big values into account, as Debbie
stopped her sample values at 99.
I wanted to provide a code as simple as possible, in order to avoid
any confusion.
Here is a formula, which can certainly be applied, whatever the limit:
if ( ( ( @{yournumber} % 10 ) = 1 ) and ( ( @{yournumber} % 100 ) <>
11 ) )
{
AsString(@{yournumber}) & "st"
}
else
{
if ( ( ( @{yournumber} % 10 ) = 2 ) and ( ( @{yournumber} % 100 )
<> 12 ) )
{
AsString(@{yournumber}) & "nd"
}
else
{
if ( ( ( @{yournumber} % 10 ) = 3 ) and ( ( @{yournumber} %
100 ) <> 13 ) )
{
AsString(@{yournumber}) & "rd"
}
else
{
AsString(@{yournumber}) & "th"
}
}
}