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
- Smartsheet Customer Resources
- 62.1K Get Help
- 351 Global Discussions
- 198 Industry Talk
- 427 Announcements
- 4.4K Ideas & Feature Requests
- 133 Brandfolder
- 127 Just for fun
- 127 Community Job Board
- 443 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!