Headers and Footers

  • Thread starter Thread starter Edgar
  • Start date Start date
E

Edgar

Hi

Does anyone know how I can display headers and footers on
the on a spreadsheet. They display when i print them but i
would also like to have them displayed when book loads.

Also is it possible to have any formulas in the footer?
 
Hi Edgar,

First part - only if you input them yourself, or if you add some VBA that
picks it up and places it on the worksheet. Could be complex, and you will
have to know all about the headers and decode them (for instance, the date
will be &D).

Second - you can't have formulae as such, but you can again write VBA to
dynamically get a value and load. Same effect, more work.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi Edgar
1. you can only see the header/footer in print preview (or of couse
after printing the sheet).
2. Excel does not support formulas in the header/footer. Though with
some VBA you can place cell values in the header/footer. e.g. put the
following code in your workbook module (inserts the cell A1 content in
each header):
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ActiveWindow.SelectedSheets
With wkSht.PageSetup
.CenterHeader = .range("A1").value
End With
Next wkSht
End Sub

Frank
 
Back
Top