HOW CAN I INSERT THE TODAY’S DATE ON THE FOOTER AND LET IT STAY UNCHANGED WHEN I PRINT THE DOC ON OTHER DAY.
THANK YOU FOR ANY HELP.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
FOOTER’S DATE (97)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » FOOTER’S DATE (97)
- This topic has 8 replies, 6 voices, and was last updated 22 years, 8 months ago.
AuthorTopicViewing 4 reply threadsAuthorReplies-
H. Legare Coleman
AskWoody PlusAugust 23, 2002 at 12:01 am #610881Select Page Setup from the File menu. Click on the Header/Footer Tab in the Dialog Box. Click on the “Custom Footer” button. In the Footer dialog box, click in the section of the footer where you want the date to appear (Left, Center, or Right) and then type in the date you want displayed in the footer. Click OK until all dialog boxes are closed.
You could also use a VBA macro like the one below to set todays date into the footer:
Public Sub SetFooter() ActiveWorkbook.Worksheets("Sheet1").PageSetup.CenterFooter = Format(Date, "dd-MMM-YYYY") End Sub
-
WSThomasH
AskWoody LoungerAugust 28, 2002 at 8:05 pm #612214Hey joe,
Did LC’s suggestion work for you? I feel your pain!
My only solution was to stop using any of the “auto-date” footer entries and just use plain text that I have to change when I revise the document. All the other things I tried change when I open or print the darn files. Of course, then it is up to me to manually change the date when I revise a doc, but I’m getting used to it.
Hope this helps! – Thomas
-
WSsdckapr
AskWoody LoungerAugust 28, 2002 at 10:02 pm #612238Try something like this, It gets the LAST saved date. If you do not save your worksheet everyday the date will NOT change.
Steve
Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftFooter = _
“Last Saved: ” & _
Format(FileDateTime(ThisWorkbook.FullName),”mmmm d, yyyy”)
End Sub
-
-
WSdcardno
AskWoody LoungerAugust 28, 2002 at 9:34 pm #612235The first question is whether you want to do this to every (or many) documents, or just to one? I had a situation where I was printing large financial models reflecting different assumptions, and it was convenient to highlight the assumptions in the footers.
I wrote the following VBA routine to insert specified text in the footers, and inserted a button on the first page of the model to run the routine:
Sub FooterText() Dim Foot1 As String Dim Foot2 As String Dim Foot3 As String Dim Foot4 As String Dim Worksht As Object Foot1 = Range("Footer1").Value Foot2 = Range("Footer2").Value Foot3 = Range("Footer3").Value Foot4 = Range("Footer4").Value For Each Worksht In Worksheets Worksht.Activate With ActiveSheet.PageSetup .LeftFooter = Foot1 & Chr(13) & Foot2 & Chr(13) & "&F &A" .CenterFooter = Format(Now, "Mmmm d 'yy") & " " & "&T" _ & Chr(13) & "page " & "&P" & " of " & "&N" .RightFooter = Foot3 & Chr(13) & Foot4 End With Next Worksht End Sub
The named ranges Footer1 to Footer 4 contained formulas to concatenate text as values, for example:
Cell C56 is the named range Footer1:
Cell A56 contains “Maximum Assets eligible for Tax Depreciation: ” (<–note the space after the colon)
Cell B56 contains a formula picking up the calculation from elsewhere on the S/sheet – say $150,256,223
Cell C56 contains "=CONCATENATE(A56, text(B56,"$#,##0.0,,"), " Million")This produces a nice text string "Maximum Assets eligible for Tax Depreciation: $150.3 Million" – which is then set down in the first line of the left footer. Similar concatenations produce other formated text in the Footer2-Footer4 ranges
As you can see, the center footer contains the date and time that the footers were updated – usually immediately before the model was printed. It is slow (I could speed it up by setting screen updating on and off, but it was really a one-off), but MUCH faster than going and amending the footers in every sheet (about twelve) every time we wanted to try a different set of assumptions (about eight times a day)- which in turn was preferable to not knowing which assumptions lead to the result on each page and constantly having to refer back to the assumptions page….
If you want to be able to do this for a number of s/sheets, include something like:
Sub Datestamp() ActiveSheet.PageSetup.CenterFooter = Format(Now, "Mmmm d 'yy") End Sub
In your personal.xls file – that way it will always be available to insert todays date in the centre footer. This will be inserted as a string – it won’t change subsequently.
-
WSpccoyle
AskWoody LoungerAugust 28, 2002 at 11:38 pm #612257 -
WSsdckapr
AskWoody LoungerAugust 29, 2002 at 12:21 am #612265Creation date and Printed date
StevePrivate Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftFooter = _
“Created: ” & _
format(ThisWorkbook.BuiltinDocumentProperties(“Creation Date”),”mmmm d, yyyy)ActiveSheet.PageSetup.rightFooter = _
“Printed: ” & _
format (Now, “mmmm d, yyyy”)
End SubAnother way to enter the saved date:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveSheet.PageSetup.centerFooter = _
“Saved: ” & _
format (Now, “mmmm d, yyyy”)
End SubSteve
-
WSpccoyle
AskWoody Lounger
-
-
-
WSjoe8888
AskWoody LoungerAugust 30, 2002 at 5:48 pm #612943To get around my problem, in my vba, I put the =today() in b5,copy b5, and pastespecial only value to b5
and use the code below. After this code, clear the b5. In this way, I can permanently save the created date in my footer, no matter I will or not save the file later.
any other idea?ActiveSheet.PageSetup.Leftfooter = _
Format(Worksheets(“Sheet2”).Range(“B5”).Value)
Viewing 4 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Asking Again here (New User and Fast change only backups)
by
thymej
2 hours, 36 minutes ago -
How much I spent on the Mac mini
by
Will Fastie
3 hours, 20 minutes ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
1 hour, 32 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
4 hours, 9 minutes ago -
Setting up Windows 11
by
Susan Bradley
1 hour, 52 minutes ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
1 hour, 27 minutes ago -
Powershell version?
by
CWBillow
29 minutes ago -
SendTom Toys
by
CWBillow
10 hours, 53 minutes ago -
Add shortcut to taskbar?
by
CWBillow
4 hours, 25 minutes ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
20 hours, 47 minutes ago -
How can I install Skype on Windows 7?
by
Help
19 hours, 29 minutes ago -
Logitech MK850 Keyboard issues
by
Rush2112
2 hours, 25 minutes ago -
We live in a simulation
by
Alex5723
1 day, 10 hours ago -
Netplwiz not working
by
RetiredGeek
21 hours, 30 minutes ago -
Windows 11 24H2 is broadly available
by
Alex5723
1 day, 23 hours ago -
Microsoft is killing Authenticator
by
Alex5723
10 hours, 58 minutes ago -
Downloads folder location
by
CWBillow
2 days, 5 hours ago -
Remove a User from Login screen
by
CWBillow
1 day, 1 hour ago -
TikTok fined €530 million for sending European user data to China
by
Nibbled To Death By Ducks
1 day, 20 hours ago -
Microsoft Speech Recognition Service Error Code 1002
by
stanhutchings
1 day, 20 hours ago -
Is it a bug or is it expected?
by
Susan Bradley
2 days, 1 hour ago -
Image for Windows TBwinRE image not enough space on target location
by
bobolink
1 day, 20 hours ago -
Start menu jump lists for some apps might not work as expected on Windows 10
by
Susan Bradley
19 hours, 33 minutes ago -
Malicious Go Modules disk-wiping malware
by
Alex5723
2 days, 9 hours ago -
Multiple Partitions?
by
CWBillow
2 days, 10 hours ago -
World Passkey Day 2025
by
Alex5723
6 hours, 36 minutes ago -
Add serial device in Windows 11
by
Theodore Dawson
3 days, 18 hours ago -
Windows 11 users reportedly losing data due forced BitLocker encryption
by
Alex5723
1 day, 19 hours ago -
Cached credentials is not a new bug
by
Susan Bradley
3 days, 23 hours ago -
Win11 24H4 Slow!
by
Bob Bible
3 days, 23 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.