ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Date format in Header (https://www.excelbanter.com/excel-discussion-misc-queries/31208-date-format-header.html)

Irma

Date format in Header
 
In the header there is an icon that will automatically insert the current
date on the header. Is there a way to put the previous day as the date in
the header? I've tried different formulas but they don't work.

Harald Staff

Hi

An easy way is a small macro in the ThisWorkbook module:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftHeader = Format(Date - 1, "dddd mmm dd yyyy")
End Sub

HTH. best wishes Harald

"Irma" skrev i melding
...
In the header there is an icon that will automatically insert the current
date on the header. Is there a way to put the previous day as the date in
the header? I've tried different formulas but they don't work.





All times are GMT +1. The time now is 09:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com