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
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
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
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks