Public Function numSuffix(num As Long)
If Right(num, 2) = 11 Then
numSuffix = num & "th"
ElseIf CInt(Right(CStr(num), 1)) = 1 Then
numSuffix = num & "st"
ElseIf Right(num, 2) = 12 Then
numSuffix = num & "th"
ElseIf CInt(Right(CStr(num), 1)) = 2 Then
numSuffix = num & "nd"
ElseIf Right(num, 2) = 13 Then
numSuffix = num & "th"
ElseIf CInt(Right(CStr(num), 1)) = 3 Then
numSuffix = num & "rd"
Else
numSuffix = num & "th"
End If
End Function
|