View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default cell reference in header

..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