Why is the Nested IF Statement showing "Incorrect Argument"?
Please help, not sure why my nested if statement is incorrect.
The formula I am using is below:
=IF(AND([Completed Date]@row <> "", [Review Date]@row <> ""), "green", IF(AND([Payroll Date]@row <= TODAY() + 31, [Payroll Date]@row > TODAY() - 31), [Payroll Date]@row = "", "Red", "Yellow", "Blue"))
Not sure where I am going wrong, please help, thanks!
Answers
-
Hi @yolanda.butler,
The first part of this nested statement is fine. The error is being caused by the second part where it looks like you want 2 IFs, but only have 1.
IF(AND([Payroll Date]@row <= TODAY() + 31, [Payroll Date]@row > TODAY() - 31)
This should have the condition if true, then another IF statement for this part:
[Payroll Date]@row = "", "Red"
Is something like this more what you're after?
=IF(AND([Completed Date]@row <> "", [Review Date]@row <> "", [Payroll Date]@row < TODAY(31), [Payroll Date]@row > TODAY(-31)), "Green", IF([Payroll Date]@row = "", "Red", IF(AND([Completed Date]@row <> "", [Review Date]@row <> ""), "Yellow", "Blue")))
Conditions:
Green: Completed & Review Dates both filled, payroll date is filled and within 31 days of today
Yellow: Green: Completed & Review Dates both filled, payroll date is filed and not within 31 days of today
Red: Payroll is blank
Blue: Payroll is filled, but either Completed or Review date is missing.
Sample:
Hope this helps, but I appreciate the example may not be exactly what you're after - if you can list the conditions for each status then we can sort out the nested IF statement required.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!