Cell reference in header

T

Terry Bennett

I'm sure there is a way of doing this but I haven't been able to figure it
out ...

I want to include some variable text in a sheet header - the text being
contained in a cell within the same workbook. I can find ways of including
the sheet name or file name in the header but not a specific cell's
contents.

Can somebody point me in the right direction?

Thanks.
 
G

Gord Dibben

Terry

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


Gord Dibben MS Excel MVP
 
T

Terry Bennett

Many thanks Gord!


Gord Dibben said:
Terry

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


Gord Dibben MS Excel MVP
 

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

Top