ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   As of date formula in a footer (https://www.excelbanter.com/excel-worksheet-functions/189102-date-formula-footer.html)

Belinda7237

As of date formula in a footer
 
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?

Bernie Deitrick

As of date formula in a footer
 
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


"Belinda7237" wrote in message
...
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?




Belinda7237

As of date formula in a footer
 
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)

"Bernie Deitrick" wrote:

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


"Belinda7237" wrote in message
...
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?





Bernie Deitrick

As of date formula in a footer
 
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


"Belinda7237" wrote in message
...
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)

"Bernie Deitrick" wrote:

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


"Belinda7237" wrote in message
...
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?








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

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