![]() |
Cell values in custom headers
How can I make a cell value appear in the custom header. I want a date in the
worksheet field A2 to appear in the header. I've tried several ways and cant get it to appear. Any suggestions would be greatly appreciated! |
Cell values in custom headers
Have you tried to concatenate() or & the value of your date field in the header ="HEADER TEXT1"&A2 or = CONCATENATE("HEADER TEXT1",A2) "davidd" wrote: How can I make a cell value appear in the custom header. I want a date in the worksheet field A2 to appear in the header. I've tried several ways and cant get it to appear. Any suggestions would be greatly appreciated! |
Cell values in custom headers
Must be done programatically via VBA.
Sub CellInHeader() With ActiveSheet .PageSetup.CenterHeader = .Range("A1").Value End With End Sub Or use a BeforePrint rountine. Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet .PageSetup.CenterHeader = .Range("A1").Value End With End Sub First macro goes into a General module. Second goes into the Thisworkbook module. Gord Dibben MS Excel MVP On Fri, 11 Aug 2006 12:16:01 -0700, davidd wrote: How can I make a cell value appear in the custom header. I want a date in the worksheet field A2 to appear in the header. I've tried several ways and cant get it to appear. Any suggestions would be greatly appreciated! |
All times are GMT +1. The time now is 02:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com