Different headers

  • Thread starter Thread starter Nasar
  • Start date Start date
N

Nasar

I am trying to create a worksheet with a different first page header (a
in MS Word). I find no option in Excel to have different headers o
different pages.

Please help

NASA
 
Hi
there's no such option in Excel. You can achieve this by creating a
macro which prints first sheet 1 and after this the other sheets with a
different header.
is using VBA an alternative for you?
 
One way:

Use a macro to

0) Set the first page header
1) Print your first page (with it's header)
2) Change the header
3) print the rest of the pages

Something like this (in the ThisWorkbook code module):

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Application.EnableEvents = False
With ActiveSheet
.PageSetup.CenterHeader = "My First Page Header"
.PrintOut From:=1, To:=1
.PageSetup.CenterHeader = "My Fine New Header"
.PrintOut From:=2
.PageSetup.CenterHeader = ""
End With
Cancel = True
Application.EnableEvents = True
End Sub

Another way:

Enter your "header" information in the first row or rows of the sheet.
Do a print preview to see where the first page break comes. In the Page
Setup/Sheet/Rows to repeat at top textbox, enter the first row(s)
beneath the page break. Enter your 2nd header there. This will obviously
break up a continuous data range, so it may not work for you.
 
Back
Top