Date manipulation within text entries

  • Thread starter Thread starter David
  • Start date Start date
Ron Rosenfeld wrote
And even shorter, and more focused on exactly what is necessary for this
routine:


=========================
Private Function OrdinalSuffix(Num) As String

Select Case Num
Case Is = 1, 31
OrdinalSuffix = "st"
Case Else
OrdinalSuffix = "th"
End Select

End Function
================================

Since the input can only be:

1, 15, 16, 28, 29, 30, 31 there is no need to check for anything else.

Cool! I'm a happy camper. Keep poking around and we might get it down to a
oneliner <vbg>
 
Ron Rosenfeld wrote


I've also found I don't need this, at least after very first trial.

I would leave that in, unless you prevent any user entries in A2.


--ron
 
Back
Top