Excel Header Formula

New Contributor

I would like to be able to use a header in excel with the formula "=today()". I know I can add todays date in the header but I was hoping to have it auto calculate every day I open the sheet to read for example: Tuesday, July 20, 2021, Wednesday, July 21, 2021 etc....

 

thanks

3 Replies
Could you please clarify what you exactly mean with a Header. Are you talking about the 1st (or 2nd, 3rd...) row of a worksheet or the Header row of a Table?
If the latter that's not possible, a Table Header must have static values

The header that isn't displayed until it's printed. Inserting Header/Footer. Under Page Setup - Header/Footer. If I choose to insert header/footer, I can choose certain header and footer elements like page #, # of pages, current date, current time etc.... I want the current date, but I want it to be in the date format of Day of the Week, Date, and Year (Tuesday, July 20, 2021) and not just 7/20/21. thanks

@7Rings 

As far as I know the only way to achieve this is to call VBA to the rescue, adding something like below to ThisWorkbook (open the VBA Editor with Alt+F11)

 

 

Private Sub Workbook_BeforePrint(Cancel As Boolean)
	ActiveSheet.PageSetup.CenterHeader = Format(Date(),"dddd, mmmm dd, yyyy")
End Sub

 

Demo.png