IF Function Due Date
I am attempting to create a project status column that is using the Harvey Balls (red, yellow, green and gray). I am wanting these to automatically change yellow when my due date column is 120 days with the due date, I would like it remain yellow until a date is entered in the completed column, then I would like it to automatically change to gray.
However if a date is not entered in the completed column and the due date is past 120 days and is 90 days until the due date then I want it to change from yellow to red, and remain red until a date is entered in the completed column, then once the date is entered in the completed column I want it to change to gray.
If the due date column is not within the 120 or 90 days to due date I would like it be green and stay green until the due date becomes 120 days till due date or 90 days till date, or until a date is entered in the completed date column then change to gray.
Can some one help with this?
thank you,
Eva
Comments
-
Shaine Greenwood Employee
Hi Eva,
You'll want to place a nested IF statement in the cells of your status column. For example:
=IF(ISDATE([Completed Date]1), "Gray", IF(TODAY() >= ([Due Date]1 - 120), "Yellow", IF(TODAY() >= ([Due Date]1 - 90), "Red", "Green")))
The above function will set the status gray if there's a date value in the "completed date" column. If today's date is greater than or equal to the Due Date - 120 days, set to yellow; if greater than or equal to Due Date - 90 days, set to red. OTHERWISE (when any of those conditions aren't met), set to green.
NOTE: Change the cell references to match the exact column names in your sheet!
More info on IF statements can be found in the help center:https://help.smartsheet.com/function/if
Let me know if you have any questions on this.
Help Article Resources
Categories
Check out theFormula Handbook template!
Try setting the criteria to 0.5 instead of 50 as you have the column set to % - right now the formula may be looking for greater than 5000% which obviously won't be found if you're using 0-100%.<\/p>
Let us know if this works or if another solution is required.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"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":[{"tagID":219,"urlcode":"sheets","name":"Sheets"},{"tagID":254,"urlcode":"formulas","name":"Formulas"},{"tagID":265,"urlcode":"reports","name":"Reports"},{"tagID":335,"urlcode":"sheet-summary","name":"Sheet Summary"},{"tagID":472,"urlcode":"cell-linking","name":"Cell linking"}]},{"discussionID":111988,"type":"question","name":"IF AND Formula Question","excerpt":"I wanted get the below formula running... but get an an #UNPARSEABLE error. =IF AND(Number@row, {Wave B (EMEA) - L4 Mapping}, CONTAINS({Wave B (EMEA) - Country x2}, \"BE\"), \"True\", \"False\") Any help would be much appreciated.","snippet":"I wanted get the below formula running... but get an an #UNPARSEABLE error. =IF AND(Number@row, {Wave B (EMEA) - L4 Mapping}, CONTAINS({Wave B (EMEA) - Country x2}, \"BE\"), \"True\",…","categoryID":322,"dateInserted":"2023-10-20T21:18:29+00:00","dateUpdated":null,"dateLastComment":"2023-10-21T08:53:03+00:00","insertUserID":164249,"insertUser":{"userID":164249,"name":"Ulrich Anderhub 1","url":"https:\/\/community.smartsheet.com\/profile\/Ulrich%20Anderhub%201","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-21T12:48:10+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":164249,"lastUser":{"userID":164249,"name":"Ulrich Anderhub 1","url":"https:\/\/community.smartsheet.com\/profile\/Ulrich%20Anderhub%201","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-21T12:48:10+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":37,"score":null,"hot":3395716292,"url":"https:\/\/community.smartsheet.com\/discussion\/111988\/if-and-formula-question","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/111988\/if-and-formula-question","format":"Rich","lastPost":{"discussionID":111988,"commentID":401071,"name":"Re: IF AND Formula Question","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/401071#Comment_401071","dateInserted":"2023-10-21T08:53:03+00:00","insertUserID":164249,"insertUser":{"userID":164249,"name":"Ulrich Anderhub 1","url":"https:\/\/community.smartsheet.com\/profile\/Ulrich%20Anderhub%201","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-21T12:48:10+00:00","banned":0,"punished":0,"private":false,"label":"✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-10-21T08:53:11+00:00","dateAnswered":"2023-10-20T21:36:57+00:00","acceptedAnswers":[{"commentID":401046,"body":"