Date manipulation within text entries

D

David

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>
 
R

Ron Rosenfeld

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
 
D

David

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

Understood it's a safegaurd. Appreciate all your time and effort on my
behalf.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top