+ Reply to Thread
Results 1 to 9 of 9

Formula for closest monday to a particular date

  1. #1
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Formula for closest monday to a particular date

    Hi Gurus

    I have a working solution for this, but was wondering if there's a more elegant way to achieve this. For any given date I want to be able to find the nearest Monday. So if the date given is a Monday already then it will return the date given. If the date given is a Tuesday it will return the day before the given date, etc.

    I won't give my solution at this stage, so it doesn't influence your replies, but will happily share it later.

    Thanks.
    Please add reputation by clicking on the * if I have helped.
    Please mark the thread SOLVED if your issue has been resolved.
    Thanks, Glenn.

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,915

    Re: Formula for closest monday to a particular date

    Try:

    =A1-WEEKDAY(A1,2)+1

    =A1-MOD(A1-2,7)

    =WORKDAY.INTL(A1+1,-1,"0111111")

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Formula for closest monday to a particular date

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Formula for closest monday to a particular date

    Quote Originally Posted by Phuocam View Post
    Try:

    =A1-WEEKDAY(A1,2)+1

    =A1-MOD(A1-2,7)

    =WORKDAY.INTL(A1+1,-1,"0111111")
    Thanks for the suggestions, however these do not work. If the date in question is a Friday these all return the previous Monday, not the next Monday, which is closer than the previous Monday. E.g. for 31 August 2018 they return 27 August 2018, which is 4 days away from 31 August, but I need it to return 3 September 2018, which is only 3 days away.

  5. #5
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Formula for closest monday to a particular date

    Quote Originally Posted by mehmetcik View Post
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thank you, that works, but I'm interested to see what others come up with too.

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,915

    Re: Formula for closest monday to a particular date

    =WORKDAY.INTl(A1+4,-1,"0111111")

  7. #7
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Formula for closest monday to a particular date

    Quote Originally Posted by Phuocam View Post
    =WORKDAY.INTl(A1+4,-1,"0111111")
    Thanks. I haven't used the WORKDAY.INTL function much, so have just read up on it. I like that solution.
    Last edited by gak67; 08-30-2018 at 07:14 PM.

  8. #8
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,915

    Re: Formula for closest monday to a particular date

    Or try:

    =A1+3-MOD(A1+1,7)

  9. #9
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Formula for closest monday to a particular date

    The method I used was:

    =A1+4-WEEKDAY(A1,15)

+ 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. [SOLVED] Date Formula which returns 3rd Monday On January
    By zanshin777 in forum Excel Formulas & Functions
    Replies: 29
    Last Post: 01-05-2016, 12:35 PM
  2. [SOLVED] VB needed to go to the closest 'Monday' date
    By af25 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-26-2014, 10:13 AM
  3. [SOLVED] Formula to give next monday date from todays date
    By john dalton in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-17-2014, 07:20 AM
  4. [SOLVED] Needing formula for date 4 weeks ago on monday
    By Aroy2416 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 11-14-2013, 09:25 AM
  5. [SOLVED] Find monday preceeding given-date unless date is a monday
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-10-2012, 07:42 AM
  6. excel date formula for the last monday passed
    By omarq in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-11-2010, 10:25 AM
  7. Formula has to take Monday if due date falls on a Sunday
    By Revathi in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-28-2006, 07:15 AM

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