Header/Footer Formula?

G

Gord Dibben

Text only but via VBA you can write the results of a formula to the
Header/Footer

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

Where A1 contains a formula.


Gord Dibben MS Excel MVP
 
S

Shane Devenshire

Hi,

Just text. However, you can use a Workbook_BeforePrint() procedure to do a
calculation and put it in the Header or Footer:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
'your calculation code here
End Sub
 
L

Lo456

Thanks!!!

Gord Dibben said:
Text only but via VBA you can write the results of a formula to the
Header/Footer

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

Where A1 contains a formula.


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