Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy comment content to cell content as data not as comment | Excel Discussion (Misc queries) | |||
Conditional cell background formatting, based on cell content | Excel Discussion (Misc queries) | |||
Cell Formula reference to cell Based On third Cell Content | Excel Discussion (Misc queries) | |||
Cell Formula reference to cell Based On third Cell Content | Excel Discussion (Misc queries) | |||
Better support for dynamic content within headers and footers | Excel Discussion (Misc queries) |