Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How can I put a value of a cell into the header?
|
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
As I recall, I had to Macro to do this.
Try this: Alt F11 Double click on THIS WORKBOOK. Click on GENERAL and pull down to WORKBOOK. On the right it shows OPEN. Change it to BeforePrint Let's say you want what's in cell A1 to be displayed. Enter this in for the macro Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet.PageSetup .RightFooter = "" .LeftFooter = "" .CenterFooter = "" .RightHeader = "" .LeftHeader = "" .CenterHeader = Range("A1").Value End With End Sub "Dana" wrote: How can I put a value of a cell into the header? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Can it include more than 1 cell?
"Barb Reinhardt" wrote: As I recall, I had to Macro to do this. Try this: Alt F11 Double click on THIS WORKBOOK. Click on GENERAL and pull down to WORKBOOK. On the right it shows OPEN. Change it to BeforePrint Let's say you want what's in cell A1 to be displayed. Enter this in for the macro Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet.PageSetup .RightFooter = "" .LeftFooter = "" .CenterFooter = "" .RightHeader = "" .LeftHeader = "" .CenterHeader = Range("A1").Value End With End Sub "Dana" wrote: How can I put a value of a cell into the header? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
..CenterHeader = Range("A1").Value
could be ..CenterHeader = Range("A1").Value & vblf & range("b1".value & _ " " & format(range("c1").value, "mm/dd/yyyy") Mickey wrote: Can it include more than 1 cell? "Barb Reinhardt" wrote: As I recall, I had to Macro to do this. Try this: Alt F11 Double click on THIS WORKBOOK. Click on GENERAL and pull down to WORKBOOK. On the right it shows OPEN. Change it to BeforePrint Let's say you want what's in cell A1 to be displayed. Enter this in for the macro Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet.PageSetup .RightFooter = "" .LeftFooter = "" .CenterFooter = "" .RightHeader = "" .LeftHeader = "" .CenterHeader = Range("A1").Value End With End Sub "Dana" wrote: How can I put a value of a cell into the header? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Maintaining cell reference after sorting | Excel Discussion (Misc queries) | |||
Loop Macro a variable number of times | Excel Discussion (Misc queries) | |||
Help with this conditional IF statement | Excel Discussion (Misc queries) | |||
Getting contents of a cell when cell reference is in the sheet | Excel Discussion (Misc queries) | |||
Input cell reference is not valid (One Variable Data Table) | Excel Worksheet Functions |