Formatting Date in Excel Footer

lzweifel

Board Regular
Joined
Feb 21, 2006
Messages
213
Hello, I did come across a very old thread that spoke of this but was unable to find it exactly as I am looking for. I would like to format my date in the footer to read... Printed: Wednesday, January 5, 2022

Thank you so much for any help, it is very much appreciated!
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I believe the only way to add a custom formatted Date to the header or footer (without changing your entire system settings) is with VBA, like this:
VBA Code:
Sub AddDateFooter()
    ActiveSheet.PageSetup.CenterFooter = "Printed: " & Format(Date, "dddd, mmmm d, yyyy")
End Sub
 
Upvote 0
Okay, and if I share the file with someone else, will it work for them?
If you save the file after adding the VBA code, the VBA code will be saved to the file.
So they will be able to use it themself, as long as they enable the VBA code and then run it.

If you run it yourself before saving the file, it will already be there (and stay there), so they really probably wouldn't need to run it themselves (unless they add new sheets).
 
Upvote 0
Yes... this worked perfectly, except it is not styled correct... sorry, how do I change the font and size?
 
Upvote 0

Forum statistics

Threads
1,214,806
Messages
6,121,667
Members
449,045
Latest member
Marcus05

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top