Date Formula for the Monday following a Date

I'm looking for a formula or automation that calculates the date of the Monday following a specific date. The initial date may be a Tuesday, Wednesday, or Thursday, but the date I need to "fill in" will always be Monday, as it's a due date. In the example below, the Schedules Due Date column needs to be the Monday after the date in the Confirmation Date. Any ideas? Thanks in advance!

dateformula.png


Tags:

Answers

  • Andrew1983
    edited 07/16/21
    Hi all, <\/p>\n

    I've seen similar requests on these forums but unfortunately I have not yet been able to make this work. <\/p>\n

    I have a project schedule with Start Date and End Date columns. My leadership would like to see two associated columns that show the Monday before<\/em> the Start Date and End Date to help with planning - so they can see everything starting and coming due in a given week. <\/p>\n

    Our initial idea was to simply manually enter this but as dates shift over time and the schedule grows, this will get complicated. <\/p>\n

    Can someone help with the formula that will essentially do \"If X date, show prior Monday date unless X date is Monday, then just show X date.\" <\/p>","bodyRaw":"

    Hi all, <\/p>\n\n

    I've seen similar requests on these forums but unfortunately I have not yet been able to make this work. <\/p>\n\n

    I have a project schedule with Start Date and End Date columns. My leadership would like to see two associated columns that show the Monday before<\/em> the Start Date and End Date to help with planning - so they can see everything starting and coming due in a given week. <\/p>\n\n

    Our initial idea was to simply manually enter this but as dates shift over time and the schedule grows, this will get complicated. <\/p>\n\n

    Can someone help with the formula that will essentially do \"If X date, show prior Monday date unless X date is Monday, then just show X date.\" <\/p>","format":"html","dateInserted":"2018-06-05T16:06:11+00:00","insertUser":{"userID":50236,"name":"Matt.Robinson","url":"https:\/\/community.smartsheet.com\/profile\/Matt.Robinson","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/drupal_profile\/files\/2018-10\/c3\/a6\/nc3a69c0268b35e36cdac1ae9e40770a9.jpg","dateLastActive":"2018-10-22T07:31:43+00:00","banned":0,"punished":0,"private":false,"label":""},"displayOptions":{"showUserLabel":false,"showCompactUserInfo":true,"showDiscussionLink":true,"showPostLink":true,"showCategoryLink":false,"renderFullContent":false,"expandByDefault":false},"url":"https:\/\/community.smartsheet.com\/discussion\/26476\/automatically-populate-monday-before-existing-date-in-sheet","embedType":"quote","name":"Automatically Populate Monday before Existing Date in Sheet"}"> https://community.smartsheet.com/discussion/26476/automatically-populate-monday-before-existing-date-in-sheet


    I actually just had the same issue, but I needed the previous monday.


    =IF(ISDATE([email protected]),如果(工作日([email protected]) = 1,[email protected]- 6,[email protected]- WEEKDAY([email protected]) + 2))


    Make sure your column property is set "DATE" or else you'll get an "invalid column value" error.


    I was going to say you need two columns to do this but I see now you're using the "confirmation date" as your actual date and then you will have your calculated Monday date in your "schedules due" date.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the公式手册template!
DATE(2020, 1, 1), [IRRF RECEIVED]@row = 0), [IMMUNISATION INCIDENT REPORT FORM SENT]@row + 10, IF(AND([IMMUNISATION INCIDENT REPORT FORM SENT]@row > DATE(2020, 1, 1), [IRRF…","categoryID":322,"dateInserted":"2022-12-05T10:10:21+00:00","dateUpdated":null,"dateLastComment":"2022-12-06T05:51:33+00:00","insertUserID":141269,"insertUser":{"userID":141269,"name":"Fialko66","url":"https:\/\/community.smartsheet.com\/profile\/Fialko66","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-06T05:52:15+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":141269,"lastUser":{"userID":141269,"name":"Fialko66","url":"https:\/\/community.smartsheet.com\/profile\/Fialko66","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-06T05:52:15+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":37,"score":null,"hot":3340543314,"url":"https:\/\/community.smartsheet.com\/discussion\/98394\/worday-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/98394\/worday-formula","format":"Rich","lastPost":{"discussionID":98394,"commentID":353244,"name":"Re: WORDAY FORMULA","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/353244#Comment_353244","dateInserted":"2022-12-06T05:51:33+00:00","insertUserID":141269,"insertUser":{"userID":141269,"name":"Fialko66","url":"https:\/\/community.smartsheet.com\/profile\/Fialko66","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-06T05:52:15+00:00","banned":0,"punished":0,"private":false,"label":"✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2022-12-06T05:54:52+00:00","dateAnswered":"2022-12-05T19:01:39+00:00","acceptedAnswers":[{"commentID":353185,"body":"

You would drop it in in place of <\/p>

[Date Column]@row + 10<\/p>


<\/p>

Everything else should stay the same.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-12-06 05:54:52","updateUser":{"userID":141269,"name":"Fialko66","url":"https:\/\/community.smartsheet.com\/profile\/Fialko66","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-06T05:52:15+00:00","banned":0,"punished":0,"private":false,"label":"✭"}}},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":98409,"type":"question","name":"I have a formula that does not work now because of the new year.","excerpt":"This formula has been working just fine until the month of December and now returns #invalid Data Type\" I assume it is because it is looking for dates within this calendar year and not next calendar year? Does anyone have any suggestions on how I can fix this problem? The formula looks at the Determination Date and then…","categoryID":322,"dateInserted":"2022-12-05T16:45:56+00:00","dateUpdated":null,"dateLastComment":"2022-12-05T19:43:51+00:00","insertUserID":126337,"insertUser":{"userID":126337,"name":"Christopher Flemings","url":"https:\/\/community.smartsheet.com\/profile\/Christopher%20Flemings","photoUrl":"https:\/\/lh3.googleusercontent.com\/-6uhStWCmgRc\/AAAAAAAAAAI\/AAAAAAAAAAA\/ACHi3rcm-Jq0CJqPMi7PAdar4X8wZHjMlw\/mo\/photo.jpg","dateLastActive":"2022-12-05T19:43:02+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"updateUserID":null,"lastUserID":126337,"lastUser":{"userID":126337,"name":"Christopher Flemings","url":"https:\/\/community.smartsheet.com\/profile\/Christopher%20Flemings","photoUrl":"https:\/\/lh3.googleusercontent.com\/-6uhStWCmgRc\/AAAAAAAAAAI\/AAAAAAAAAAA\/ACHi3rcm-Jq0CJqPMi7PAdar4X8wZHjMlw\/mo\/photo.jpg","dateLastActive":"2022-12-05T19:43:02+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":5,"countViews":27,"score":null,"hot":3340531187,"url":"https:\/\/community.smartsheet.com\/discussion\/98409\/i-have-a-formula-that-does-not-work-now-because-of-the-new-year","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/98409\/i-have-a-formula-that-does-not-work-now-because-of-the-new-year","format":"Rich","lastPost":{"discussionID":98409,"commentID":353207,"name":"Re: I have a formula that does not work now because of the new year.","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/353207#Comment_353207","dateInserted":"2022-12-05T19:43:51+00:00","insertUserID":126337,"insertUser":{"userID":126337,"name":"Christopher Flemings","url":"https:\/\/community.smartsheet.com\/profile\/Christopher%20Flemings","photoUrl":"https:\/\/lh3.googleusercontent.com\/-6uhStWCmgRc\/AAAAAAAAAAI\/AAAAAAAAAAA\/ACHi3rcm-Jq0CJqPMi7PAdar4X8wZHjMlw\/mo\/photo.jpg","dateLastActive":"2022-12-05T19:43:02+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2022-12-05T19:15:44+00:00","dateAnswered":"2022-12-05T19:11:41+00:00","acceptedAnswers":[{"commentID":353196,"body":"

@Christopher Flemings<\/a> <\/p>

=IF([CONDITIONAL LICENCE]@row, DATE(if(MONTH([Determination Date]@row)=12,YEAR([Determination Date]@row)+1,YEAR([Determination Date]@row)), MONTH([Determination Date]@row) + 1, DAY([Determination Date]@row)), \"//www.santa-greenland.com/community/discussion/comment/\")<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-12-05 19:15:44","updateUser":{"userID":126337,"name":"Christopher Flemings","url":"https:\/\/community.smartsheet.com\/profile\/Christopher%20Flemings","photoUrl":"https:\/\/lh3.googleusercontent.com\/-6uhStWCmgRc\/AAAAAAAAAAI\/AAAAAAAAAAA\/ACHi3rcm-Jq0CJqPMi7PAdar4X8wZHjMlw\/mo\/photo.jpg","dateLastActive":"2022-12-05T19:43:02+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}}},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":98391,"type":"question","name":"Help w\/multiple AND NOT ISBLANK date field formula","excerpt":"Hi team - I have 6 date column fields that are automatically formatted (record a date) when a Status field changes. Let's just call those columns: Date1 Date2 Date3 Date4 Date5 Date6 I created a check box \"helper column\" that I'd like to create a formula that looks across those fields to determine if ALL of them have a…","categoryID":322,"dateInserted":"2022-12-04T15:40:46+00:00","dateUpdated":null,"dateLastComment":"2022-12-05T14:52:40+00:00","insertUserID":118864,"insertUser":{"userID":118864,"name":"jmo","title":"","url":"https:\/\/community.smartsheet.com\/profile\/jmo","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!g0lA5zVbOLw!-wfAd_lcHz4!voKaS5U1cZv","dateLastActive":"2022-12-05T14:51:27+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"updateUserID":null,"lastUserID":118864,"lastUser":{"userID":118864,"name":"jmo","title":"","url":"https:\/\/community.smartsheet.com\/profile\/jmo","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!g0lA5zVbOLw!-wfAd_lcHz4!voKaS5U1cZv","dateLastActive":"2022-12-05T14:51:27+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":30,"score":null,"hot":3340422806,"url":"https:\/\/community.smartsheet.com\/discussion\/98391\/help-w-multiple-and-not-isblank-date-field-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/98391\/help-w-multiple-and-not-isblank-date-field-formula","format":"Rich","lastPost":{"discussionID":98391,"commentID":353142,"name":"Re: Help w\/multiple AND NOT ISBLANK date field formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/353142#Comment_353142","dateInserted":"2022-12-05T14:52:40+00:00","insertUserID":118864,"insertUser":{"userID":118864,"name":"jmo","title":"","url":"https:\/\/community.smartsheet.com\/profile\/jmo","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!g0lA5zVbOLw!-wfAd_lcHz4!voKaS5U1cZv","dateLastActive":"2022-12-05T14:51:27+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2022-12-05T14:51:25+00:00","dateAnswered":"2022-12-04T15:45:20+00:00","acceptedAnswers":[{"commentID":353088,"body":"

Hey @jmo<\/a> <\/p>

Are your date fields contiguous (all side by side?). I'm assuming they are. If not, each date field will have to be added to the COUNTIFS individually<\/p>

=IF(COUNTIFS([Date1]@row:[Date6]@row, ISDATE(@cell))=6, 1)<\/p>

Will this work for you?<\/p>

Kelly<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-12-05 14:51:25","updateUser":{"userID":118864,"name":"jmo","title":"","url":"https:\/\/community.smartsheet.com\/profile\/jmo","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!g0lA5zVbOLw!-wfAd_lcHz4!voKaS5U1cZv","dateLastActive":"2022-12-05T14:51:27+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}}},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]}],"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">