Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date change button/macro
Hello,
I use a spreadhseet as a timesheet for work, and every week I have to change the dates. I use the date in the first cell (for Monday) and the others just calculate "+1". What kind of a macro can I assign to a button that I can just click to add 7 to the Monday date? Thanks, Kamran |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date change button/macro
Kamran, Try using the following Worksheet function:
=IF(WEEKDAY(TODAY())=2,TODAY(),IF(WEEKDAY(TODAY()) <2,TODAY()+1,TODAY()-WEEKDAY(TODAY())+2)) It should update everytime you open excel -- Charles Chickering "A good example is twice the value of good advice." "Kamran" wrote: Hello, I use a spreadhseet as a timesheet for work, and every week I have to change the dates. I use the date in the first cell (for Monday) and the others just calculate "+1". What kind of a macro can I assign to a button that I can just click to add 7 to the Monday date? Thanks, Kamran |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date change button/macro
Hi Charles,
Thanks for the formula; never seen anything like that, can you please describe what it's calculating? I'm not sure I'm going to be able to use it, let me explain. I keep an Excel document, where for each week I add a new tab for my timesheet for that week. All I want to do is update the one cell where Monday's date is. So I don't want it to update automatically, because the old time sheets need to remain static. I want a macro that I can assign to a toolbar button that will just add 7 to that Monday date. All other dates are already calculated based on the Monday, so I don't need to worry about them. Thanks, Kamran. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use Macro To Change Which Macro Assigned To Command Button | Excel Discussion (Misc queries) | |||
VBA to change Button Macro assignment | Excel Programming | |||
Change caption on a macro button | Excel Worksheet Functions | |||
Macro button colour change??? | Excel Worksheet Functions | |||
Change the color of an Excel Macro button? | Excel Programming |