A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi Kate,
Thanks for your note. No, this is still a problem. Even entering MM/DD/YYYY defaults to DD-MMM ("10/20/2017" becomes "20-Oct")
I solved the problem by creating three macros and then assigning the macros to Ribbon buttons in a new group called "Formats." I also created some other number formatting macros and added them to this group.
Here are the date macros:
To format to a short date:
Sub FormatDateShort()
'
' FormatDateShort Macro
' Formats to the short date: 6/25/2017
'
Selection.NumberFormat = "m/d/yyyy"
End Sub
To format to a long date:
Sub FormatDateLong()
'
' FormatDateLong Macro
' Formats to the long date: June 25, 2017
'
Selection.NumberFormat = "mmmm d, yyyy"
End Sub
To format to MMM and YYYY:
Sub FormatDateMonYR()
'
' FormatCellDateMonYR Macro
' Sets format of date cell to MMM YYYY
'
Selection.NumberFormat = "mmm yyyy"
End Sub
You can use this same code to use other formats as well. For example, I created a macro to format billions and millions to "##0.0B" and "##0.0M":
Selection.NumberFormat = "#,##0.00,,""M"""
Selection.NumberFormat = "#,##0.00,,,""B"""
Obviously these need to be in to separate Sub routines, which are formatted just like the date subroutines.
Attention MS programmers, for user's sakes. Can't you get rid on the DD-MMM default format? No one in the U.S. uses it.