Claus Busch wrote:
Hi Terry,
Am Mon, 22 Aug 2016 19:07:06 +0100 schrieb Terry Pinnell:
With a fresh worksheet in that workbook I was pleased to see that it
still worked. But if I closed and re-opened Excel and started a fresh
workbook, how would I get it working then?
you can also use a simple macro and place it in the PERSONAL.xlsb. Then
you can work with it in each workbook.
Enter your dates like 23/7/16, select you dates and run following macro:
Sub FormatDate()
Dim rngC As Range
For Each rngC In Selection
If IsDate(rngC) Then
Select Case Day(rngC)
Case 1, 21, 31
rngC.NumberFormat = "dddd d""st"" mmmm yyyy"
Case 2, 22
rngC.NumberFormat = "dddd d""nd"" mmmm yyyy"
Case 3, 23
rngC.NumberFormat = "dddd d""rd"" mmmm yyyy"
Case Else
rngC.NumberFormat = "dddd d""th"" mmmm yyyy"
End Select
End If
Next
End Sub
Regards
Claus B.
As you see from this screenshot, I'm plainly doing something wrong.
Neither your code nor that from GS to change the 'theme' is working.
https://dl.dropboxusercontent.com/u/...cel-VBA-01.jpg
--
Terry, East Grinstead, UK