ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Can I use cell contents to update footers in excel? (https://www.excelbanter.com/excel-discussion-misc-queries/40451-can-i-use-cell-contents-update-footers-excel.html)

GregW

Can I use cell contents to update footers in excel?
 
I want to create dynamic footers with information in a cell. Is there a way
to do this?

JE McGimpsey

You'll need to use an Event Macro. One way:

Put something like this in your ThisWorkbook code module:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim ws As Worksheet
For Each ws In ActiveWindow.SelectedSheets
ws.PageSetup.LeftFooter = Sheets("Sheet1").Range("A1").Text
Next ws
End Sub

If you're not familiar with macros, take a look at David McRitchie's
"Getting Started with Macros":

http://www.mvps.org/dmcritchie/excel/getstarted.htm


In article ,
"GregW" wrote:

I want to create dynamic footers with information in a cell. Is there a way
to do this?


GregW

Apparently this is a common question - I should have browsed the questions
before posting.

Thanks for the reply - I think I found one of your replies to an earlier
question. Did it and it worked great.

"JE McGimpsey" wrote:

You'll need to use an Event Macro. One way:

Put something like this in your ThisWorkbook code module:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim ws As Worksheet
For Each ws In ActiveWindow.SelectedSheets
ws.PageSetup.LeftFooter = Sheets("Sheet1").Range("A1").Text
Next ws
End Sub

If you're not familiar with macros, take a look at David McRitchie's
"Getting Started with Macros":

http://www.mvps.org/dmcritchie/excel/getstarted.htm


In article ,
"GregW" wrote:

I want to create dynamic footers with information in a cell. Is there a way
to do this?




All times are GMT +1. The time now is 11:11 PM.

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