Nested IF Formula for Flag functionality
My sheet has an End Date, Actual Date and Late column. The Late column shows a flag.
I want to show flag red when
- the Actual Date is blank, but the End Date is today or in the past - AND
- the Actual Date is past the End Date
Here is what I have so far, but I'm getting an INCORRECT ARGUMENT SET error:
=IF(AND(ISBLANK([Actual Date]@row), TODAY() > [End Date]@row, [End Date]@row <= [Actual Date]@row, 1, 0))
Thank you for any tips!
Barb
Best Answer
-
Haha. Okay just remove the equals sign. From Greater than or equals....
=IF(OR(AND(TODAY() > [End Date]@row, ISBLANK([Actual Date]@row)), AND(TODAY() > [End Date]@row, [End Date]@row < [Actual Date]@row)), 1, 0)
Answers
-
@Barb Littrell Great job, you were so close. You just had to close the AND statement before you finished the IF formula. I moved the parenthesis for you below. Let me know how it works! It will require all three things to be true before flagging it!
=IF(AND(ISBLANK([Actual Date]@row), TODAY() > [End Date]@row, [End Date]@row <= [Actual Date]@row), 1, 0)
-
@Mike Wilday Thanks for the quick reply!!
I pasted your formula in the cell and eliminated the error.
However, it doesn't seem to work all the way correctly. See my snippet here.
I should get flagged in the second grey row where the Actual Date is later than the End Date.
I also should get flagged in the first white row where the Actual Date is blank, but the End Date is in the past.
Any ideas?
-
As I stated, the flag will fire if ALL three actions are true. Try this one...
=IF(OR(ISBLANK([Actual Date]@row), AND(TODAY() > [End Date]@row, [End Date]@row <= [Actual Date]@row)), 1, 0)
This one will check if the Actual Date@row is blank OR if the other two functions are true.
Did that work?
-
Unfortunately this didn't work all the way either.
Now all is being flagged when
- the Actual Date is blank, even if the date is in the future and
- the Actual Date is the same as the End Date
Maybe I should divide the statements out somehow to simplify what I'm trying to do?
-
Naw, we can get this! :D
I think we need two and statements in the OR statement. Try this one! Trial by fire.
=IF(OR(AND(TODAY() > [End Date]@row, ISBLANK([Actual Date]@row)), AND(TODAY() > [End Date]@row, [End Date]@row <= [Actual Date]@row)), 1, 0)
-
Alrighty then. Let's get 'er done all in one! :)
We are so close...
- Actual Date is blank with End Date in the future = white flag = CORRECT
- Actual Date is prior to End Date = white flag = CORRECT
- Actual Date is past the End Date = red flag = CORRECT
- Actual Date is the same as the End Date = red flag = WRONG
-
Haha. Okay just remove the equals sign. From Greater than or equals....
=IF(OR(AND(TODAY() > [End Date]@row, ISBLANK([Actual Date]@row)), AND(TODAY() > [End Date]@row, [End Date]@row < [Actual Date]@row)), 1, 0)
-
That did it!!!!
Thank you so much Mike! I appreciate you helping me crack this nut!
Have a fantastic rest of the week.
Barb
-
You too! Happy Smartsheeting!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!