Heades & Footers

B

Brian Ray

Can I reference a cell in a custom header or footer? I've looked at various help sites, but I see no mention of this?
 
B

Bob Umlas

No.
Bob Umlas
Excel MVP


Brian Ray said:
Can I reference a cell in a custom header or footer? I've looked at
various help sites, but I see no mention of this?
 
F

Frank Kabel

Hi
this can only be done with VBA. Put the following code in your workbook
module (not in an standard module)

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In Me.Worksheets
if LCase(wkSht.Name) = "alldata" then
With wkSht.PageSetup
.CenterHeader = wkSht.range("A1").value
End With
end with
Next wkSht
End Sub
 
Top