Excel header/footer cell reference

  • Thread starter Thread starter Guest
  • Start date Start date
Paddy

With the use of VBA, yes.

Sub CellInFooter()
With ActiveSheet
.PageSetup.CenterFooter = .Range("A1").text
End With
End Sub


Gord Dibben Excel MVP
 
Via code? Yes.

You can use the workbook_beforeprint event to modify the header.

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Me.Worksheets("sheet1")
.PageSetup.CenterFooter = .Range("a1").Text
End With
End Sub

This goes behind the ThisWorkbook module.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Back
Top