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.
-
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.
-
The criteria you have listed is the same for Red and Blue. Can you specify that?
-
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?)
-
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"))
-
Thank you! This worked!
-
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.
-
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")
-
That worked! thank you!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.8K Get Help
- 474 Global Discussions
- 202 Use Cases
- 515 Announcements
- 5.5K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 82 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!