View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default How can you format a date in the header/footer of Excel sheet

Sam

Whatever format is in the Windows Regional and Language Settings governs what
the format is in the header or footer.

These are very limited and Excel recognizes only a few for header formatting.

To get a header date format of your choosing use a cell reference for the
header.

e.g. In A1 enter =TEXT(DATE(2006,12,10),"dddd, mmmm d"&", "&"yyyy")

Then run this macro.

Sub CellInHeader()
With ActiveSheet
.PageSetup.CenterHeader = Range("A1").Value
End With
End Sub


Gord Dibben MS Excel MVP


On Sun, 10 Dec 2006 13:43:17 -0800, "SAM SEBAIHI"
wrote:

When viewing a header/footer, I would like to insert a date in spcial format, how can I do this?


--------------------------------------------------------------------------------

Sam Sebaihi
Faculty
Western International University
Associate Programs

(alternate email)
Phone #: (405)315-8223 Time zone: Pacific Time