Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default Cell to match footer

Can someone please give me the formula for a cell to match what the page
header or footer says?

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 897
Default Cell to match footer

Here's a series of short UDFs that will give you what you want. Paste
in a standard module (see http://www.rondebruin.nl/code.htm for
placement assistance).

Function GetLeftHeader()
GetLeftHeader = ActiveSheet.PageSetup.LeftHeader
End Function
Function GetCenterHeader()
GetCenterHeader = ActiveSheet.PageSetup.CenterHeader
End Function
Function GetRightHeader()
GetRightHeader = ActiveSheet.PageSetup.RightHeader
End Function
Function GetLeftFooter()
GetLeftFooter = ActiveSheet.PageSetup.LeftFooter
End Function
Function GetCenterFooter()
GetCenterFooter = ActiveSheet.PageSetup.CenterFooter
End Function
Function GetRightFooter()
GetRightFooter = ActiveSheet.PageSetup.RightFooter
End Function


To use: Just put the function name on the cell, prefixed by an equal
sign. For example, to get the left header text in cell A1:

=GetLeftHeader()

If you use this code in your PERSONAL.XLS workbook, you may have to
prefix the code like this:

=PERSONAL.XLS!GetLeftHeader()


HTH,
JP

On Mar 31, 11:37*am, texansgal
wrote:
Can someone please give me the formula for a cell to match what the page
header or footer says?

Thanks!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to change the Excel Header and Footer margins to match the Training Goddess Excel Worksheet Functions 2 May 4th 07 09:21 PM
Reference a footer in a cell Elizabeth Excel Worksheet Functions 1 January 30th 07 05:31 PM
Take a Cell and add it to the Footer or Tab Frank Costa Excel Worksheet Functions 6 October 27th 06 03:43 PM
cell pattern footer wsk Excel Discussion (Misc queries) 1 May 14th 06 02:21 PM
Contents of cell in footer dbhenkel Excel Discussion (Misc queries) 6 March 15th 05 03:15 PM


All times are GMT +1. The time now is 04:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"