Page Header concern

B

Bri

Greetings (I'm not sure this is posted to the right forum)

a) How do I put the contents of a cell into the header? (will vary from
worksheet to worksheet)

b) I'm sure I'm missing something obvious, but where do I set the LEFT and
RIGHT header margins? (I can only find top and bottom) I'd like them to be
the same as the L and R margins for printing the main body of the document.

Thank you
Bri
 
G

Guest

You can't put the contents of a cell in a header or footer, but you can put
the Tab name in a header or footer. File, Page setup, Heder/Footer, Custom
header - there should be a button for the tab name, or you type in "&[Tab]"
(without the quotes). Maybe by naming your tabs appropriatly, you could make
this work for you.

Left and right margins are on the same Page setup tab as the top and bottom
margins. Different version of Excel look slightly different on the page
setup dialog box so it's hard to describe what it should look like.
 
D

Desert Piranha

Bri said:
Greetings (I'm not sure this is posted to the right forum)

a) How do I put the contents of a cell into the header? (will vary
from
worksheet to worksheet)

b) I'm sure I'm missing something obvious, but where do I set the LEFT
and
RIGHT header margins? (I can only find top and bottom) I'd like them
to be
the same as the L and R margins for printing the main body of the
document.

Thank you
BriHi Bri,
For question A:
If your interested in doing it by code, this will take whatever is in
cell A3 on each sheet
and put it into the header on that sheet. You can change for your
needs.
Will work for veiwing or printing. The code must go into the "Workbook"
module.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftHeader = ActiveSheet.Range("A3").Value
End Sub

You can use
..LeftHeader or .CenterHeader or .RightHeader
..LeftFooter or .CenterFooter or .RightFooter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Header and Footer margins 1
Header and Footer 3
Headers 2
Print area query 1
Header space 4
header/page border 2
Format Page setup for multiple worksheet in a workbook 4
Header & Footer Spacing 4

Top