Forum Discussion
7Rings
Jul 20, 2021Copper Contributor
Excel Header Formula
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 ...
7Rings
Jul 20, 2021Copper Contributor
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
Lorenzo
Jul 20, 2021Silver Contributor
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