MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Format date in header

Posted by Jami Harrison on January 02, 2002 1:03 PM

I would like to format the date inserted into the header to look like January 2, 2002 14:39 PM. Can you help? Excel 2000

Posted by Tom Urtis on January 02, 2002 2:19 PM

Try this code as a part of a macro or BeforePrint workbook event.

Sheets("Sheet3").PageSetup.CenterFooter = Format(Date, "mmmm dd, yyyy")

Tom Urtis

Posted by Tom Urtis on January 02, 2002 4:30 PM

This may be closer to what you want

Try this for the time as well as the date in your header:

Sheets("Sheet3").PageSetup.CenterHeader = Format(Now, "mmmm d, yyyy h:mm AM/PM")

Tom Urtis