View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld[_2_] Ron Rosenfeld[_2_] is offline
external usenet poster
 
Posts: 1,045
Default How to custom format a date

On Wed, 30 Nov 2011 23:36:36 -0800 (PST), shriil wrote:

For Excel 2007+, you can use conditional formatting.

Let us assume you are formatting M1

Select M1
Format/cells/Number/Custom Type: * *dt\h mmmm yyyy

Then select Conditional Formatting:
New Rule
* *Formula: * =OR(DAY(M1)=3,DAY(M1)=23)
* *Format/Number/Custom Type: *d\r\d mmmm yyyy

New Rule
* *Formula: *=OR(DAY(M1)=2,DAY(M1)=22)
* *Format/Number/Custom/Type: *d\n\d mmmm yyyy

New Rule
* *Formula: *=OR(DAY(M1)=1,DAY(M1)=21,DAY(M1)=31)
* *Format/Number/Custom/Type: *d\st mmmm yyyy

You can copy/paste the format to whatever cells you wish.- Hide quoted text -

- Show quoted text -



Wow .. you made it so simple.

Thanks a lot for the advice!


Glad to help. Thanks for the feedback.