+ Reply to Thread
Results 1 to 5 of 5

update date of the week/month compared to today

  1. #1
    Registered User
    Join Date
    07-12-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    59

    update date of the week/month compared to today

    hey Guys,

    im looking for some code that will be able to tell what day/date of the week it is and then update a cell to the next tuesday for example. so if today is friday the 20th, i want to be able to set the cell A2 to reference tuesday the 24th, then on wednesday the 25th it will autmatically change to tuesday 31st

    im creating a spreadsheet that requires some data to be entered at various times: on every tuesday, on the 4th of every month etc

    i want a page that looks at todays date and says, the follow data needs to be updated


    hope this is clear enough, having trouble getting accross what im trying to do.

    any help always appreciated

    thoughts?

  2. #2
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: update date of the week/month compared to today

    If you wanted to have the date changed so that when the workbook opens it checks the date and if the date is less than the current date (in the past) then it will add on 7 days. So say if you set cell A5 to the 17-7-2012 (Tuesday) and the workbook is opened today the following code will add 7 days to A5 -> making it the 24/7/2012. This code would work if the workbook is opened at least once a week.
    Please Login or Register  to view this content.
    This would go into ThisWorkbook and not into a module so it is run every time the workbook is opened
    Hope this helps.
    Anthony
    Pack my box with five dozen liquor jugs
    PS: Remember to mark your questions as Solved once you are satisfied. Please rate the answer(s) by selecting the Star in the lower left next to the Triangle. It is appreciated?

  3. #3
    Registered User
    Join Date
    07-12-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: update date of the week/month compared to today

    thanks for the reply smuzoen

    its close to what i need....

    can you help me add a 'for each cell in column' to change for every cell from B15:B75 for example.

    if so i think i can make it work with a little more manipualtion on my behalf

  4. #4
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: update date of the week/month compared to today

    Try
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: update date of the week/month compared to today

    Pl try this formula.

    =IF(WEEKDAY(TODAY(),1)=3,TODAY(),IF(WEEKDAY(TODAY(),1)<3,TODAY()+3-WEEKDAY(TODAY(),1),TODAY()+10-WEEKDAY(TODAY(),1)))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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