Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I add present month, as number, to an header in excel?
Have a work book with many sheets and want to have as part of a header:
"Sheet Name" - "Present Month" - "Present Year" that will update automatically header would look like "name-12-06" was hoping I could do &[Tab] - &[Month] - &[Year] the &[Tab] is ok, any thoughts on the rest. Agnes |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I add present month, as number, to an header in excel?
Agnes
Could you live with a macro? Sub Sheet_Date_Header() ActiveSheet.PageSetup.RightHeader = ActiveSheet.Name & _ "-" & Format(Now, "mm") & _ "-" & Format(Now, "yy") End Sub If you want completely automatic you could use in a BeforePrint macro. Private Sub Workbook_BeforePrint(Cancel As Boolean) ActiveSheet.PageSetup.RightHeader = ActiveSheet.Name & _ "-" & Format(Now, "mm") & _ "-" & Format(Now, "yy") End Sub Gord Dibben MS Excel MVP On Thu, 21 Dec 2006 10:01:02 -0800, Agnes _TASOT <Agnes wrote: Have a work book with many sheets and want to have as part of a header: "Sheet Name" - "Present Month" - "Present Year" that will update automatically header would look like "name-12-06" was hoping I could do &[Tab] - &[Month] - &[Year] the &[Tab] is ok, any thoughts on the rest. Agnes |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
holiday dates | Excel Worksheet Functions | |||
How to calculate number of month from 2008 in Excel? | Excel Discussion (Misc queries) | |||
Return SEARCHED Column Number of Numeric Label and Value | Excel Worksheet Functions | |||
Difference in number of Excel NewsGroups | Excel Discussion (Misc queries) | |||
how to get week number in month in excel ? | Charts and Charting in Excel |