+ Reply to Thread
Results 1 to 3 of 3

Adding a formula to the header

  1. #1
    Michelle
    Guest

    Adding a formula to the header

    I need to create a spreadsheet that takes the data in cell K10 and places it
    in the right section of the header.

    If this is a macro solution I am not highly skilled in them so as much info
    as possible is appreciated.

    Thanks in advance.
    Michelle

  2. #2
    Sloth
    Guest

    RE: Adding a formula to the header

    Taking from the help - "You cannot insert graphics or cell references in a
    header or footer. Use print titles if you want to repeat cell contents or a
    graphic on every printed page."

    that being said you can use this macro to change the header. Right click on
    the sheet tab and click View Code. Right click on ThisWorkbook and click
    Insert->Module. Insert this code in Module1...

    Sub Macro1()
    ActiveSheet.PageSetup.RightHeader = Cells(10, 11)
    End Sub

    you can then link this macro to a button. When you run the macro, it will
    change the header for you according to cell K10. I know there is a way to
    trigger a macro like this when you save, or when you print. Unfortunately,
    my experience is quite limited, and I don't know how.

    "Michelle" wrote:

    > I need to create a spreadsheet that takes the data in cell K10 and places it
    > in the right section of the header.
    >
    > If this is a macro solution I am not highly skilled in them so as much info
    > as possible is appreciated.
    >
    > Thanks in advance.
    > Michelle


  3. #3
    Sloth
    Guest

    RE: Adding a formula to the header

    Private Sub Workbook_BeforePrint(Cancel As Boolean)
    ActiveSheet.PageSetup.RightHeader = Cells(10, 11)
    End Sub

    insert this code in "ThisWorkbook". It will trigger when you hit print, or
    print preview.

    "Sloth" wrote:

    > Taking from the help - "You cannot insert graphics or cell references in a
    > header or footer. Use print titles if you want to repeat cell contents or a
    > graphic on every printed page."
    >
    > that being said you can use this macro to change the header. Right click on
    > the sheet tab and click View Code. Right click on ThisWorkbook and click
    > Insert->Module. Insert this code in Module1...
    >
    > Sub Macro1()
    > ActiveSheet.PageSetup.RightHeader = Cells(10, 11)
    > End Sub
    >
    > you can then link this macro to a button. When you run the macro, it will
    > change the header for you according to cell K10. I know there is a way to
    > trigger a macro like this when you save, or when you print. Unfortunately,
    > my experience is quite limited, and I don't know how.
    >
    > "Michelle" wrote:
    >
    > > I need to create a spreadsheet that takes the data in cell K10 and places it
    > > in the right section of the header.
    > >
    > > If this is a macro solution I am not highly skilled in them so as much info
    > > as possible is appreciated.
    > >
    > > Thanks in advance.
    > > Michelle


+ 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