Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date: Week in header
I need to automatically add to a header the dates of the week (Monday through
Friday) that the current date falls in. For example, today is 12/04/2007. I want the header to also show that this week is 12/03/07-12/07/07. Any help? Thanks -- happysak |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date: Week in header
Hi
Try =TEXT((A1-WEEKDAY(A1)+2),"dd/mm/yy")& " - " &TEXT((A1-WEEKDAY(A1))+6,"dd/mm/yy") -- Regards Roger Govier "happysak" wrote in message ... I need to automatically add to a header the dates of the week (Monday through Friday) that the current date falls in. For example, today is 12/04/2007. I want the header to also show that this week is 12/03/07-12/07/07. Any help? Thanks -- happysak |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date: Week in header
Put the following macro in the workbook code area:
Private Sub Workbook_BeforePrint(Cancel As Boolean) d = Date d1 = d - Application.WorksheetFunction.Weekday(d) + 2 d2 = d1 + 4 ActiveSheet.PageSetup.CenterHeader = d1 & "-" & d2 End Sub -- Gary''s Student - gsnu200759 "happysak" wrote: I need to automatically add to a header the dates of the week (Monday through Friday) that the current date falls in. For example, today is 12/04/2007. I want the header to also show that this week is 12/03/07-12/07/07. Any help? Thanks -- happysak |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date: Week in header
This might have worked with a little tweaking. You gave me lots of ideas I
can use another time. In the meantime, next reply worked. Thanks for your help. -- happysak "Roger Govier" wrote: Hi Try =TEXT((A1-WEEKDAY(A1)+2),"dd/mm/yy")& " - " &TEXT((A1-WEEKDAY(A1))+6,"dd/mm/yy") -- Regards Roger Govier "happysak" wrote in message ... I need to automatically add to a header the dates of the week (Monday through Friday) that the current date falls in. For example, today is 12/04/2007. I want the header to also show that this week is 12/03/07-12/07/07. Any help? Thanks -- happysak |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date: Week in header
This worked just fine. I actually wanted the week on the left under some
other dates, text, etc., but I was able to figure out how to do that. This will make my life a whole lot easier. Thank you for your expertise and for sharing it. -- happysak "Gary''s Student" wrote: Put the following macro in the workbook code area: Private Sub Workbook_BeforePrint(Cancel As Boolean) d = Date d1 = d - Application.WorksheetFunction.Weekday(d) + 2 d2 = d1 + 4 ActiveSheet.PageSetup.CenterHeader = d1 & "-" & d2 End Sub -- Gary''s Student - gsnu200759 "happysak" wrote: I need to automatically add to a header the dates of the week (Monday through Friday) that the current date falls in. For example, today is 12/04/2007. I want the header to also show that this week is 12/03/07-12/07/07. Any help? Thanks -- happysak |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Display "this week" column headers w/date & day of week? | Excel Worksheet Functions | |||
Date Function formula that will return the date of a specific week | Excel Worksheet Functions | |||
How do I add the day of the week to Excel header | Excel Discussion (Misc queries) | |||
Finding the Monday date based on a different date in same week | Excel Worksheet Functions | |||
I need week number in excell from a date, first week must be mini. | Excel Discussion (Misc queries) |