+ Reply to Thread
Results 1 to 6 of 6

Display the first day of the current week in a cell. Updates via a macro button

  1. #1
    Registered User
    Join Date
    09-18-2013
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Display the first day of the current week in a cell. Updates via a macro button

    I need to have a cell on my spreadsheet(B3) display the first day(monday) of the current week in a dd/mm/yyyy format. I would like this to be calculated and updated when a macro button is pushed. I already have the button set up, just can't quite figure out the code. Any thoughts?

    Thank you for your time.

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Display the first day of the current week in a cell. Updates via a macro button

    try this

    Please Login or Register  to view this content.
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Registered User
    Join Date
    09-18-2013
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Display the first day of the current week in a cell. Updates via a macro button

    Getting close, but I need to operate under the assumption that the user may hit the macro on different days of the week. That being said, the "...Now() + 2..." won't cut it. Is there a way to do this dynamically? However, I do not understand how much of excel works, so that may be correct. What is the Now() +2 doing?
    Last edited by jclark4321; 09-18-2013 at 06:41 PM.

  4. #4
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Display the first day of the current week in a cell. Updates via a macro button

    actually it should work on any day....I'm subtracting 2 days from the weekday function....it is dynamic by the fact that I'm substracting from the weekday function...try it tomorrow and it should still come up on 16/09/2013...at least it does on my system...I use this formula in a template that the demand analyst here run whenever they want...it loads a file that is always created on Monday of that week. If it doesn't work tomorrow let me know and we'll work on it....

  5. #5
    Registered User
    Join Date
    09-18-2013
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Display the first day of the current week in a cell. Updates via a macro button

    Well fantastic, thank you very much! :

  6. #6
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Display the first day of the current week in a cell. Updates via a macro button

    glad I could help....and thanks for the points...again, though, if it doesn't work, let me know....

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Display Current Week # according to range.
    By lxa8888 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-25-2012, 05:20 PM
  2. Display Current Week in Excell
    By RR01 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-06-2012, 03:17 AM
  3. [SOLVED] Looking for Fomula to display week in Current Quarter
    By Cra5h in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-13-2012, 03:21 PM
  4. Macro to sort an activity sheet by current week and current + last 1 and 2 weeks
    By engineering_excel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-13-2011, 11:28 AM
  5. Replies: 4
    Last Post: 03-21-2011, 05:37 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1