Custom Date formats - Capitalized

sebjac

New Member
Joined
Jul 4, 2008
Messages
2
Hi

With dddd dd mmm yyyy as custom date format, i get Tuesday 13 May 1986

I would like it in capitals - ie TUESDAY 13 MAY 1986

How do i do that?

Cheers,
Seb
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi

You'll need to use a formula I'm afraid something like:

=UPPER(TEXT(Date,"dddd dd mmm yyyy"))

where Date is your date cell, for example.
 
Upvote 0
Hi Seb,

Welcome to the board!

This isn't possible to do using custom formatting. You can either use data validation to only allow uppercase entry (but if someone is using numbers that are being "converted" into days and months this won't work).

The alternative is to use VBA. The following code should work. Bear in mind however, that is changes the Excel date serial to a text string. This means you won't be able to use it in calculations.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Or Target.HasFormula Then Exit Sub
    On Error Resume Next
    If Not Intersect(Target, Range("A1:B20")) Is Nothing Then
        Application.EnableEvents = False
        Target = StrConv(Format(Target.Value, "dddd dd mmm yyyy"), vbUpperCase)
        Application.EnableEvents = True
    End If
    On Error GoTo 0
    
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,956
Messages
6,122,465
Members
449,085
Latest member
ExcelError

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top