+ Reply to Thread
Results 1 to 3 of 3

Can I place a formula/cell reference in the Header/footer Excel

  1. #1
    john mcmichael
    Guest

    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. #2
    Jason Morin
    Guest

    RE: Can I place a formula/cell reference in the Header/footer Excel

    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. #3
    james
    Guest

    RE: Can I place a formula/cell reference in the Header/footer Exce

    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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1