Way to display a formula result in header or footer?

  • Thread starter StargateFanNotAtHome
  • Start date

S

StargateFanNotAtHome

Another thing I've wondered about for some time, is there a way to
display a calculation result in either the header or the footer?

i.e., say the sheet had grand total or $350.00, it would be neat to
have something like the header text say "Grand Total: $", then
whatever code such as, oh, [GrandTotal,G50], who knows how it would go
.... so that the grand total is displayed in either header or footer.

Thx! :blush:D
 
Ad

Advertisements

G

Gord Dibben

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



Gord Dibben MS Excel MVP
 
S

StargateFan

Check out

http://www.codeforexcelandoutlook.com/blog/2008/04/udf-to-return-page-headersfooters-text/

If you wanted to set the left header:

ActiveSheet.PageSetup.LeftHeader = ' your calculation here

Kewl, so it _is_ possible. Learn something new every day.
Let me know if it works!

Will do! Thanks. :blush:D
--JP

Another thing I've wondered about for some time, is there a way to
display a calculation result in either the header or the footer?

i.e., say the sheet had grand total or $350.00, it would be neat to
have something like the header text say "Grand Total:  $", then
whatever code such as, oh, [GrandTotal,G50], who knows how it would go
... so that the grand total is displayed in either header or footer.

Thx!   :blush:D
 
S

StargateFan

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

Wow, thanks. Will try this one, too.

Cheers! :blush:D
Gord Dibben MS Excel MVP

Another thing I've wondered about for some time, is there a way to
display a calculation result in either the header or the footer?

i.e., say the sheet had grand total or $350.00, it would be neat to
have something like the header text say "Grand Total: $", then
whatever code such as, oh, [GrandTotal,G50], who knows how it would go
... so that the grand total is displayed in either header or footer.

Thx! :blush:D
 
Ad

Advertisements

Ad

Advertisements


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