As of date formula in a footer

  • Thread starter Thread starter Belinda7237
  • Start date Start date
B

Belinda7237

I am trying to figure out how to insert a formula in a footer so that when
the page is printed the current date and time will appear but i also want to
include an as of date. My as of date will always be the monday prior to the
print date.

Is this possible?
 
Belinda,

If you put the date and time in the right side of the footer, then you can use code to update the
left side with your As of:

ActiveSheet.PageSetup.LeftFooter = "As of " & Format(Date - Weekday(Date, 2) + 1, "mmmm d, yyyy")

HTH,
Bernie
MS Excel MVP
 
thanks, but I have one more question - when i am in page setup and insert
that into the footer it comes out as is - how do i insert code into the
footer? (sorry a first for me)
 
Belinda,

You cannot insert code into the footer - the best you can do is use the code
I posted in a macro, or in the beforeprint event.

Bernie
 
Back
Top