More than 2 logical expressions for OR function?
I'm trying to write an OR function that returns an RYGB ball with 3-4 logical expressions but it keeps giving me an error message. Can it only have 2 logical expressions? Here's my formula (i didn't add the Blue logic yet since I couldn't even get the 3 conditions to work) -
=IF(OR((TODAY() - [Due Date]@row) >= 14, (TODAY() - [Due Date]@row) <= 13, (TODAY() > [Due Date]@row)), "Green", "Yellow", "Red")
The logic is:
If today’s date is >= 14 days from the Due Date, then green ball
If today’s date is <= 13 days days from the Due Date, then yellow
If today’s date is past the Due Date, then red
If today’s date is is past the Due Date, then blue
Thank you!
Best Answers
-
You are giving two different options ("Yellow" and "Red") if the logical expression is not met. You must put the desired outcome immediately following each logic check, and the final one is the "every other instance".
=IF(logical_expression, value_if_true, [value_if_false])
[value if false] is where you would put the second logic check and associated color following it, and down the line.
Hope this helps.
-
Paul Newcome ✭✭✭✭✭✭
Yes. Your blue is redundant, but it is not the same as Today's Date >=Due Date.
Today's Date >=Due Date is the same as the "Red" criteria. Your Blue criteria is a combination of your "Yellow" and "Green".
Taking out the redundancy of the "Blue", you would have something along the lines of...
=IF(TODAY() > [Due Date]@row, "Red", IF(TODAY(14) <= [Due Date]@row, "Green", "Yellow"))
Answers
-
You are giving two different options ("Yellow" and "Red") if the logical expression is not met. You must put the desired outcome immediately following each logic check, and the final one is the "every other instance".
=IF(logical_expression, value_if_true, [value_if_false])
[value if false] is where you would put the second logic check and associated color following it, and down the line.
Hope this helps.
-
Paul Newcome ✭✭✭✭✭✭
The criteria you have listed is the same for Red and Blue. Can you specify that?
-
cdh8331 ✭✭✭
Apologies ...
The logic is:
If today’s date is >= 14 days from the Due Date, then green ball
If today’s date is <= 13 days days from the Due Date, then yellow
If today’s date is past the Due Date, then red
If today’s date is earlier than or equal to the Due Date, then blue (but is that redundant with Today's Date >=Due Date?)
-
Paul Newcome ✭✭✭✭✭✭
Yes. Your blue is redundant, but it is not the same as Today's Date >=Due Date.
Today's Date >=Due Date is the same as the "Red" criteria. Your Blue criteria is a combination of your "Yellow" and "Green".
Taking out the redundancy of the "Blue", you would have something along the lines of...
=IF(TODAY() > [Due Date]@row, "Red", IF(TODAY(14) <= [Due Date]@row, "Green", "Yellow"))
-
cdh8331 ✭✭✭
Thank you! This worked!
-
Paul Newcome ✭✭✭✭✭✭
-
cdh8331 ✭✭✭
I have another question for this. I realized I missed one of the criteria.
If Signed Agreement Received IS NOT checked and
- today’s date is >= 14 days from the Due Date, then green ball
- If today’s date is <= 13 days days from the Due Date, then yellow
- If today’s date is past the Due Date, then red
- If today’s date is earlier than or equal to the Due Date, then blue (but is that redundant with Today's Date >=Due Date?)
Here's my formula that seems to be working.
=IF([Signed Agreement Received]@row = 0, IF(TODAY() > [SA Due Date]@row, "Red", IF(TODAY() = [SA Due Date]@row, "Blue", IF(TODAY() < [SA Due Date]@row, "Green", "Yellow"))))
How do I add if the box IS checked
If Signed Agreement Received IS checked then blue.
Right now, once the box is checked, the RYGB ball just disappears altogether and the cell is left blank.
-
Paul Newcome ✭✭✭✭✭✭
Since your very first IF is specifying the box NOT being checked, then we run a series of nested IF's for the "if true" portion of that, then we can just put the output into the third "else" portion of that first IF for when the box being not checked is false.
=IF([Signed Agreement Received]@row = 0, IF(TODAY() > [SA Due Date]@row, "Red", IF(TODAY() = [SA Due Date]@row, "Blue", IF(TODAY() < [SA Due Date]@row, "Green", "Yellow"))), "Blue")
-
cdh8331 ✭✭✭
That worked! thank you!
-
Paul Newcome ✭✭✭✭✭✭
Help Article Resources
Categories
Hi @BristolCVN<\/a> <\/p> I hope you're well and safe!<\/p> You must add\/change the Rule #1 name.<\/p> Did that work\/help? <\/p> I hope that helps!<\/p> Be safe, and have a fantastic week!<\/p> Best,<\/p> Andrée Starå<\/strong><\/a> | Workflow Consultant \/ CEO @ WORK BOLD<\/strong><\/a><\/p> ✅Did my post(s) help or answer your question or solve your problem? Please support the Community by <\/em>marking it Insightful\/Vote Up, Awesome, or\/and as the accepted answer<\/em><\/strong>. It will make it easier for others to find a solution or help to answer!<\/em><\/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":443,"urlcode":"dynamic-view","name":"Dynamic View"}]},{"discussionID":108759,"type":"question","name":"Help with formula","excerpt":"I am wanting to count the number of drop down items selected in a cell, but I only want it to count in the cell for a specific row. This is the sheet that i want to count the number of dropdown items from. This is the sheet that i want the formula written in to return an output. Currently I have =IF(HAS({centers},…","snippet":"I am wanting to count the number of drop down items selected in a cell, but I only want it to count in the cell for a specific row. This is the sheet that i want to count the…","categoryID":322,"dateInserted":"2023-08-09T20:13:45+00:00","dateUpdated":null,"dateLastComment":"2023-08-10T17:17:45+00:00","insertUserID":161673,"insertUser":{"userID":161673,"name":"Lauren Hughes","url":"https:\/\/community.smartsheet.com\/profile\/Lauren%20Hughes","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!WSHqXkuSMHM!nddov_PnFbs!Fw3jLOwOmG0","dateLastActive":"2023-08-10T17:37:14+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"},"updateUserID":null,"lastUserID":45516,"lastUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-08-10T17:25:14+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":28,"score":null,"hot":3383301690,"url":"https:\/\/community.smartsheet.com\/discussion\/108759\/help-with-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108759\/help-with-formula","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":108759,"commentID":390080,"name":"Re: Help with formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/390080#Comment_390080","dateInserted":"2023-08-10T17:17:45+00:00","insertUserID":45516,"insertUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-08-10T17:25:14+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,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/CM7LO30OUR2Q\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-10T17:16:38+00:00","dateAnswered":"2023-08-09T21:23:23+00:00","acceptedAnswers":[{"commentID":389908,"body":" Try this:<\/p> =COUNTM(COLLECT({July}, {Centers}, HAS(@cell, Center@row)))<\/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":254,"urlcode":"Formulas","name":"Formulas"}]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=322&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&sort=-hot&limit=3&expand%5B0%5D=all&expand%5B1%5D=-body&expand%5B2%5D=insertUser&expand%5B3%5D=lastUser&status=accepted","prevURL":null,"currentPage":1,"total":10000,"limit":3},"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">