Try this
Sub Macro1()
With ActiveSheet.PageSetup
.LeftHeader = Range("A1").Value
.CenterHeader = Range("F2").Value
.RightHeader = Range("M5").Value
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
End With
End Sub
If you wish to learn the some basic (forgive the pun) VBA, try using Tools |
Macros | Record Macro
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email
"igbert" wrote in message
...
Would anyone knows how a marco to insert different cell content as header
onto different worksheets within a workbook?
For Example
Sheet 1 : use Cell A1 as header
Sheet 2 : usse Cell F2 as header
Sheet 3 : use Cell M5 as header
Igbert