Display cell contents in the Header or Footer?

G

Guest

I'm wondering if there is a way to display the contents of a cell in the
header or footer of a spreadsheet.
 
C

Chip Pearson

Not automatically. You need to use VBA to do it. In the
ThisWorkbook code module, use code like the following:

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


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

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