Function String Numerics Class

NumberAndSuffix

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

Signature (Visual Basic / VBA)

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

Code Example

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

Parameters

Parameter Description
vValue Number that will be returned in string form along with the appropriate suffix. 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.