View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default How do I set a custom header to a cell value in Excel 2003?

Sub CellInHeader()
With ActiveSheet.PageSetup
.LeftHeader = "&""Algerian,Regular""&16" & Range("A1").Value
End With
End Sub

Or without any formatting..................

Sub CellInFooter()
With ActiveSheet
.PageSetup.CenterFooter = .Range("A1").Value
End With
End Sub


Gord Dibben MS Excel MVP

On Wed, 2 Sep 2009 12:01:03 -0700, Siggy
wrote:

I am trying to progam a header so that it matches the data in a spreadsheet
by attaching the header to a cell in the worksheet.