Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 44
Default Use different cell content as headers

Would anyone knows how a marco to insert different cell content as header
onto different worksheets within a workbook?


For Example

Sheet 1 : use Cell A1 as header
Sheet 2 : usse Cell F2 as header
Sheet 3 : use Cell M5 as header

Igbert

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default Use different cell content as headers

Try this
Sub Macro1()
With ActiveSheet.PageSetup
.LeftHeader = Range("A1").Value
.CenterHeader = Range("F2").Value
.RightHeader = Range("M5").Value
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
End With
End Sub

If you wish to learn the some basic (forgive the pun) VBA, try using Tools |
Macros | Record Macro
best wishes

--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"igbert" wrote in message
...
Would anyone knows how a marco to insert different cell content as header
onto different worksheets within a workbook?


For Example

Sheet 1 : use Cell A1 as header
Sheet 2 : usse Cell F2 as header
Sheet 3 : use Cell M5 as header

Igbert



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Use different cell content as headers

Not without creating 3 print jobs.

One for each sheet to be printed.


Gord Dibben MS Excel MVP

On Fri, 28 Dec 2007 06:58:02 -0800, igbert
wrote:

Would anyone knows how a marco to insert different cell content as header
onto different worksheets within a workbook?


For Example

Sheet 1 : use Cell A1 as header
Sheet 2 : usse Cell F2 as header
Sheet 3 : use Cell M5 as header

Igbert


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 44
Default Use different cell content as headers

Hi Bernard,

Is there a way to autorun this macro. Also, is it possible to use two cells
content as header? i.e. A1 and A2 for Sheet 1, B3 and B4 for Sheet 2

Thanks

Igbert

"Bernard Liengme" wrote:

Try this
Sub Macro1()
With ActiveSheet.PageSetup
.LeftHeader = Range("A1").Value
.CenterHeader = Range("F2").Value
.RightHeader = Range("M5").Value
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
End With
End Sub

If you wish to learn the some basic (forgive the pun) VBA, try using Tools |
Macros | Record Macro
best wishes

--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"igbert" wrote in message
...
Would anyone knows how a marco to insert different cell content as header
onto different worksheets within a workbook?


For Example

Sheet 1 : use Cell A1 as header
Sheet 2 : usse Cell F2 as header
Sheet 3 : use Cell M5 as header

Igbert




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
copy comment content to cell content as data not as comment Lilach Excel Discussion (Misc queries) 2 June 21st 07 12:28 PM
Conditional cell background formatting, based on cell content nosivad Excel Discussion (Misc queries) 5 February 11th 06 11:12 PM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 1 February 11th 05 06:36 AM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 0 February 11th 05 05:35 AM
Better support for dynamic content within headers and footers Anvil Scott Excel Discussion (Misc queries) 1 December 21st 04 08:33 PM


All times are GMT +1. The time now is 01:12 PM.

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

About Us

"It's about Microsoft Excel"