+ Reply to Thread
Results 1 to 3 of 3

Excel header/footer cell reference

  1. #1
    Paddy
    Guest

    Excel header/footer cell reference

    In Excel is it possible to put a cell referenc in a header or footer?

  2. #2
    Gord Dibben
    Guest

    Re: Excel header/footer cell reference

    Paddy

    With the use of VBA, yes.

    Sub CellInFooter()
    With ActiveSheet
    .PageSetup.CenterFooter = .Range("A1").text
    End With
    End Sub


    Gord Dibben Excel MVP

    On Thu, 15 Dec 2005 21:08:03 -0800, "Paddy" <[email protected]>
    wrote:

    >In Excel is it possible to put a cell referenc in a header or footer?


  3. #3
    Dave Peterson
    Guest

    Re: Excel header/footer cell reference

    Via code? Yes.

    You can use the workbook_beforeprint event to modify the header.

    Option Explicit
    Private Sub Workbook_BeforePrint(Cancel As Boolean)
    With Me.Worksheets("sheet1")
    .PageSetup.CenterFooter = .Range("a1").Text
    End With
    End Sub

    This goes behind the ThisWorkbook module.

    If you're new to macros, you may want to read David McRitchie's intro at:
    http://www.mvps.org/dmcritchie/excel/getstarted.htm



    Paddy wrote:
    >
    > In Excel is it possible to put a cell referenc in a header or footer?


    --

    Dave Peterson

+ 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