Footer

  • Thread starter Thread starter John
  • Start date Start date
J

John

Is there a way to have the left and right sections of a
page footer display the contents of a cell? Thanks in
advance! John
 
Hi John
only possible with VBA. You may try the following macro (put this in
your workbook module - not in a standard module):
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In Me.Worksheets
With wkSht.PageSetup
.LeftFooter = wkSht.range("A1").value
.RightFooter = wkSht.range("B1").value
End With
Next wkSht
End Sub
 
John,

There is no built in way to do this. You have to use VBA code to
do this. For example, in the ThisWorkbook code module, use
something like

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Worksheets("Sheet1").PageSetup.LeftHeader = _
Worksheets("Sheet1").Range("A1").Value
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top