Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cell References in Headers (Excel 2003)

    Is it possible to put a cell reference into an Excel header? I've used tab names but now need to distinguish similar worksheets by their tabs and do not want the additional elements to appear in the header. So, it would be a great help if I could capture the header information in a worksheet cell, Thanks!

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Cell References in Headers (Excel 2003)

    Not directly. It would require a macro. The best place to put the macro in the beforeprint event to make sure the header is uptodate when you print preview or print. Add something like this in VB to the thisworkbook object:

    <pre>Private Sub Workbook_BeforePrint(Cancel As Boolean)
    ActiveSheet.PageSetup.LeftHeader = ActiveSheet.Range("a1").Value
    End Sub</pre>


    It will add the contents of cell A1 in the activesheet to the left header of the activesheet. Change as appropriate.

    If you need more details, let us know.

    Steve

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cell References in Headers (Excel 2003)

    Can you try to explain what you are trying to accomplish again. Your first sentence sounds like you want to have the contents of a cell appear in the header when you print the sheet. Your second sentence sounds like what you want is to put the sheets tab name into the header. Your last sentence sounds like you want to put what would be in the header into a cell.
    Legare Coleman

Posting Permissions

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