Gordon,
Thank you, I have found the code on a different newsgroup thread.
I do not use macros much, but managed to get it to work.
Lisa,
As I had managed to get it to work I thought I would put the exact details
of how to do it, much thanks to Ron Rosenfeld.
Right click on the worksheet tab.
Select View Code from the dropdown menu.
Paste the code below into the window that opens.
=============================
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim aoi As Range, c As Range
Dim Suffix As String
Set aoi = [a1:a100] 'set this to where you might be entering dates
On Error GoTo Handler
If Not Intersect(Target, aoi) Is Nothing Or _
Not Intersect(Target.Dependents, aoi) Is Nothing Then
For Each c In aoi
If IsDate(c.Value) Then
Select Case Day(c.Value)
Case Is = 1, 21, 31
Suffix = "\s\t"
Case Is = 2, 22
Suffix = "\n\d"
Case Is = 3, 23
Suffix = "\r\d"
Case Else
Suffix = "\t\h"
End Select
c.NumberFormat = "mmm d" & Suffix & " yyyy"
End If
Next c
End If
Exit Sub
Handler: If Not Intersect(Target, aoi) Is Nothing Then Resume Next
If Err.Description <> "No cells were found." Then
MsgBox ("Error #" & Err & " " & Err.Description)
End If
End Sub
=============================
Now if you enter a date (or just edit it) it should appear with the ordinal
As I am in the UK I changed the Number format line to
c.NumberFormat = "ddd d" & Suffix & " mmm" & " yyyy"
Which gave me
Mon 28th Aug 2006
The original code gives
Aug 28th 2006
Good Luck, Barbara.