Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use Macro To Change Which Macro Assigned To Command Button CVinje Excel Discussion (Misc queries) 0 May 25th 10 09:55 PM
VBA to change Button Macro assignment Ken Loomis Excel Programming 2 August 6th 05 05:47 PM
Change caption on a macro button gbeard Excel Worksheet Functions 3 April 21st 05 01:43 PM
Macro button colour change??? Beefyme Excel Worksheet Functions 1 November 19th 04 06:15 PM
Change the color of an Excel Macro button? JT Excel Programming 4 November 8th 04 12:21 AM


All times are GMT +1. The time now is 11:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"