Function String Numerics Class

NumberSuffix

For converting numbers like "1" to "st", "2" to "nd", etc. Returns the suffix only. Similar to the NumberAndSuffix function except that that one returns both the number and its suffix.

Signature (Visual Basic / VBA)

Public Function NumberSuffix( _
    ByVal vValue As Variant _
    ) As Variant

Code Example

    NumberSuffix(1) = "st"
    NumberSuffix(2) = "nd"
    NumberSuffix(13) = "th"
    NumberSuffix(42) = "nd"
    NumberSuffix(45) = "th"

Parameters

Parameter Description
vValue Number whose suffix is to be returned. The suffix denotes the position of the item with this number within the list of items. Function returns Null if vValue is Null or cannot be fixed up to a number.