Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
john mcmichael
 
Posts: n/a
Default Can I place a formula/cell reference in the Header/footer Excel

I would like to place a formula in the Header/footer area so that I can pull
info from one changing cell to the header/footer. Is this possible and if so
how? Thanks in advance to all that reply
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

You can set the header/footer to reference the value of a cell that contains
your formula. For example:

Sub Test()
Dim rFormulaCell As Range
Set rFormulaCell = ActiveSheet.[D1] '<-- change cell
With ActiveSheet
.PageSetup.CenterHeader = rFormulaCell
.PrintOut Copies:=1, Collate:=True
End With
End Sub

---
HTH
Jason
Atlanta, GA


"john mcmichael" wrote:

I would like to place a formula in the Header/footer area so that I can pull
info from one changing cell to the header/footer. Is this possible and if so
how? Thanks in advance to all that reply

  #3   Report Post  
james
 
Posts: n/a
Default

It works great. On another note, I tried to put more flexibility by using
named range instead of actual cell reference. However, I got error 438 and
424.

Can it work with named range? Thanks.

James


"Jason Morin" wrote:

You can set the header/footer to reference the value of a cell that contains
your formula. For example:

Sub Test()
Dim rFormulaCell As Range
Set rFormulaCell = ActiveSheet.[D1] '<-- change cell
With ActiveSheet
.PageSetup.CenterHeader = rFormulaCell
.PrintOut Copies:=1, Collate:=True
End With
End Sub

---
HTH
Jason
Atlanta, GA


"john mcmichael" wrote:

I would like to place a formula in the Header/footer area so that I can pull
info from one changing cell to the header/footer. Is this possible and if so
how? Thanks in advance to all that reply

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maintaining cell reference after sorting GRITS Excel Discussion (Misc queries) 2 April 30th 23 07:42 PM
Cell Reference in Header Dave Excel Discussion (Misc queries) 1 May 20th 05 08:56 PM
How to reference a text cell that changes weekly in Header or Foo. duane Excel Discussion (Misc queries) 2 March 20th 05 02:31 PM
Cell Reference Math Ralph Howarth Excel Worksheet Functions 0 January 26th 05 06:27 PM
Place a set value in a cell from a drop down list name reference Alan Lipscomb Excel Worksheet Functions 1 November 6th 04 12:07 AM


All times are GMT +1. The time now is 05:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"