Excel - Insert today's month in a header
SolvedRaymond PENTIER Posted messages 58211 Registration date Status Contributor Last intervention -
Hello,
I would like to set it up so that when I open an Excel file, the month and year will display in the header. To do this, I went to Page Layout > Header/Footer > Custom Header, clicked on 'Insert Date', and the following expression automatically appeared: &[Date], which displays the year-month-day format.
Is there an expression that allows the previous month and year to be displayed? For example, we are in February, but I would like the default to show the previous month, which would be January 2024 in the header?
3 answers
-
Good evening
Not to my knowledge, there is no way to enter a formula of your choice in the headers
A way to work around this is to give the sheet the name you would like to see in the header, say January 2024 in your case, and display it in the header using Insert Sheet Name: &[Tab]
-
Good evening.
It's absolutely impossible.
You just have to put your formula in the first line of your sheet ...
Retirement is great! Especially in the Antilles ...
Raymond (INSA, AFPA) -
... and you do this in a blank file, which you save under the name "Template with date"; to create new files with the date at the top, you open this template file, work on it, and save it under a new name.
It's nice, retirement! Especially in the West Indies...
Raymond (INSA, AFPA)