Nested IF OR limits?
I have some very involved nested IF(OR( formulas in my sheet. They all work past the initial IF, and the the first IF(OR( statement, then ignores everything past that one. I'm hoping it's just a syntax issue vs a limitation.
Here's one example:
=IF([Outsource Due Date]@row = "", IF([Route Number]@row = "FAB-WELD-NOFIN-09", WORKDAY([Assembly Start Date]@row, -4), IF(OR([Route Number]@row = "FAB-FIN-01", [Route Number]@row = "FAB-FIN-07", [Route Number]@row = "FAB-WELD-FIN-01"), WORKDAY([Collect for OS Finish Due Date]@row, -2, IF(OR([Route Number]@row = "FAB-WELD-FIN-03", [Route Number]@row = "FAB-WELD-FIN-11", [Route Number]@row = "FAB-WELD-FIN-ASSY-03", [Route Number]@row = "FAB-WELD-FIN-ASSY-11"), WORKDAY([Collect for OS Finish Due Date]@row, -2, IF(OR([Route Number]@row = "FAB-WELD-FIN-04", [Route Number]@row = "FAB-WELD-FIN-08", [Route Number]@row = "FAB-WELD-FAB-FIN-06", [Route Number]@row = "FAB-WELD-FAB-FIN-05", [Route Number]@row = "FAB-WELD-FAB-FIN-19", [Route Number]@row = "FAB-WELD-FAB-FIN-20", [Route Number]@row = "FAB-WELD-FIN-ASSY-04", [Route Number]@row = "FAB-WELD-FIN-ASSY-08", WORKDAY([Collect for OS Finish Due Date]@row, -3, IF(OR([Route Number]@row = "FAB-WELD-FIN-05", [Route Number]@row = "FAB-WELD-FIN-09", [Route Number]@row = "FAB-WELD-FAB-FIN-07", [Route Number]@row = "FAB-WELD-FAB-FIN-08", [Route Number]@row = "FAB-WELD-FAB-FIN-15", [Route Number]@row = "FAB-WELD-FAB-FIN-16", [Route Number]@row = "FAB-WELD-FIN-ASSY-05", [Route Number]@row = "FAB-WELD-FIN-ASSY-09"), WORKDAY([Collect for OS Finish Due Date]@row, -4, IF(OR([Route Number]@row = "FAB-WELD-FAB-FIN-09", [Route Number]@row = "FAB-WELD-FAB-FIN-10", [Route Number]@row = "FAB-WELD-FAB-FIN-17", [Route Number]@row = "FAB-WELD-FAB-FIN-18"), WORKDAY([Collect for OS Finish Due Date]@row, -5, IF(OR([Route Number]@row = "FAB-NOFIN-01", [Route Number]@row = "FAB-NOFIN-07"), WORKDAY([Assembly Start Date]@row, -1, IF(OR([Route Number]@row = "FAB-WELD-NOFIN-03", [Route Number]@row = "FAB-WELD-NOFIN-11"), WORKDAY([Assembly Start Date]@row, -2, IF(OR([Route Number]@row = "FAB-WELD-NOFIN-04", [Route Number]@row = "FAB-WELD-NOFIN-05", [Route Number]@row = "FAB-WELD-NOFIN-08"), WORKDAY([Assembly Start Date]@row, -3), ""))))))))))))))))), "OUTSOURCED")
Best Answer
-
Hey @LakeWaconia
You're missing closed parenthesis for some of your WORKDAY and OR statements. One easy way to check these things is to just cycle though the end parenthesis and make sure they are reference the IF false statements.
=IF([Outsource Due Date]@row = "", IF([Route Number]@row = "FAB-WELD-NOFIN-09", WORKDAY([Assembly Start Date]@row, -4), IF(OR([Route Number]@row = "FAB-FIN-01", [Route Number]@row = "FAB-FIN-07", [Route Number]@row = "FAB-WELD-FIN-01"), WORKDAY([Collect for OS Finish Due Date]@row, -2), IF(OR([Route Number]@row = "FAB-WELD-FIN-03", [Route Number]@row = "FAB-WELD-FIN-11", [Route Number]@row = "FAB-WELD-FIN-ASSY-03", [Route Number]@row = "FAB-WELD-FIN-ASSY-11"), WORKDAY([Collect for OS Finish Due Date]@row, -2), IF(OR([Route Number]@row = "FAB-WELD-FIN-04", [Route Number]@row = "FAB-WELD-FIN-08", [Route Number]@row = "FAB-WELD-FAB-FIN-06", [Route Number]@row = "FAB-WELD-FAB-FIN-05", [Route Number]@row = "FAB-WELD-FAB-FIN-19", [Route Number]@row = "FAB-WELD-FAB-FIN-20", [Route Number]@row = "FAB-WELD-FIN-ASSY-04", [Route Number]@row = "FAB-WELD-FIN-ASSY-08"), WORKDAY([Collect for OS Finish Due Date]@row, -3), IF(OR([Route Number]@row = "FAB-WELD-FIN-05", [Route Number]@row = "FAB-WELD-FIN-09", [Route Number]@row = "FAB-WELD-FAB-FIN-07", [Route Number]@row = "FAB-WELD-FAB-FIN-08", [Route Number]@row = "FAB-WELD-FAB-FIN-15", [Route Number]@row = "FAB-WELD-FAB-FIN-16", [Route Number]@row = "FAB-WELD-FIN-ASSY-05", [Route Number]@row = "FAB-WELD-FIN-ASSY-09"), WORKDAY([Collect for OS Finish Due Date]@row, -4), IF(OR([Route Number]@row = "FAB-WELD-FAB-FIN-09", [Route Number]@row = "FAB-WELD-FAB-FIN-10", [Route Number]@row = "FAB-WELD-FAB-FIN-17", [Route Number]@row = "FAB-WELD-FAB-FIN-18"), WORKDAY([Collect for OS Finish Due Date]@row, -5), IF(OR([Route Number]@row = "FAB-NOFIN-01", [Route Number]@row = "FAB-NOFIN-07"), WORKDAY([Assembly Start Date]@row, -1), IF(OR([Route Number]@row = "FAB-WELD-NOFIN-03", [Route Number]@row = "FAB-WELD-NOFIN-11"), WORKDAY([Assembly Start Date]@row, -2), IF(OR([Route Number]@row = "FAB-WELD-NOFIN-04", [Route Number]@row = "FAB-WELD-NOFIN-05", [Route Number]@row = "FAB-WELD-NOFIN-08"), WORKDAY([Assembly Start Date]@row, -3), ""))))))))), "OUTSOURCED")
Answers
-
Hey @LakeWaconia
You're missing closed parenthesis for some of your WORKDAY and OR statements. One easy way to check these things is to just cycle though the end parenthesis and make sure they are reference the IF false statements.
=IF([Outsource Due Date]@row = "", IF([Route Number]@row = "FAB-WELD-NOFIN-09", WORKDAY([Assembly Start Date]@row, -4), IF(OR([Route Number]@row = "FAB-FIN-01", [Route Number]@row = "FAB-FIN-07", [Route Number]@row = "FAB-WELD-FIN-01"), WORKDAY([Collect for OS Finish Due Date]@row, -2), IF(OR([Route Number]@row = "FAB-WELD-FIN-03", [Route Number]@row = "FAB-WELD-FIN-11", [Route Number]@row = "FAB-WELD-FIN-ASSY-03", [Route Number]@row = "FAB-WELD-FIN-ASSY-11"), WORKDAY([Collect for OS Finish Due Date]@row, -2), IF(OR([Route Number]@row = "FAB-WELD-FIN-04", [Route Number]@row = "FAB-WELD-FIN-08", [Route Number]@row = "FAB-WELD-FAB-FIN-06", [Route Number]@row = "FAB-WELD-FAB-FIN-05", [Route Number]@row = "FAB-WELD-FAB-FIN-19", [Route Number]@row = "FAB-WELD-FAB-FIN-20", [Route Number]@row = "FAB-WELD-FIN-ASSY-04", [Route Number]@row = "FAB-WELD-FIN-ASSY-08"), WORKDAY([Collect for OS Finish Due Date]@row, -3), IF(OR([Route Number]@row = "FAB-WELD-FIN-05", [Route Number]@row = "FAB-WELD-FIN-09", [Route Number]@row = "FAB-WELD-FAB-FIN-07", [Route Number]@row = "FAB-WELD-FAB-FIN-08", [Route Number]@row = "FAB-WELD-FAB-FIN-15", [Route Number]@row = "FAB-WELD-FAB-FIN-16", [Route Number]@row = "FAB-WELD-FIN-ASSY-05", [Route Number]@row = "FAB-WELD-FIN-ASSY-09"), WORKDAY([Collect for OS Finish Due Date]@row, -4), IF(OR([Route Number]@row = "FAB-WELD-FAB-FIN-09", [Route Number]@row = "FAB-WELD-FAB-FIN-10", [Route Number]@row = "FAB-WELD-FAB-FIN-17", [Route Number]@row = "FAB-WELD-FAB-FIN-18"), WORKDAY([Collect for OS Finish Due Date]@row, -5), IF(OR([Route Number]@row = "FAB-NOFIN-01", [Route Number]@row = "FAB-NOFIN-07"), WORKDAY([Assembly Start Date]@row, -1), IF(OR([Route Number]@row = "FAB-WELD-NOFIN-03", [Route Number]@row = "FAB-WELD-NOFIN-11"), WORKDAY([Assembly Start Date]@row, -2), IF(OR([Route Number]@row = "FAB-WELD-NOFIN-04", [Route Number]@row = "FAB-WELD-NOFIN-05", [Route Number]@row = "FAB-WELD-NOFIN-08"), WORKDAY([Assembly Start Date]@row, -3), ""))))))))), "OUTSOURCED")
-
Thank you Devin! Your insights on the parenthesis helped me fix my formula. Posted here as comparison for anyone's future reference.
=IF([Outsource Due Date]@row = "", IF([Route Number]@row = "FAB-WELD-NOFIN-09", WORKDAY([Assembly Start Date]@row, -4), IF(OR([Route Number]@row = "FAB-FIN-01", [Route Number]@row = "FAB-FIN-07", [Route Number]@row = "FAB-WELD-FIN-01"), WORKDAY([Collect for OS Finish Due Date]@row, -2), IF(OR([Route Number]@row = "FAB-WELD-FIN-03", [Route Number]@row = "FAB-WELD-FIN-11", [Route Number]@row = "FAB-WELD-FIN-ASSY-03", [Route Number]@row = "FAB-WELD-FIN-ASSY-11"), WORKDAY([Collect for OS Finish Due Date]@row, -2), IF(OR([Route Number]@row = "FAB-WELD-FIN-04", [Route Number]@row = "FAB-WELD-FIN-08", [Route Number]@row = "FAB-WELD-FAB-FIN-06", [Route Number]@row = "FAB-WELD-FAB-FIN-05", [Route Number]@row = "FAB-WELD-FAB-FIN-19", [Route Number]@row = "FAB-WELD-FAB-FIN-20", [Route Number]@row = "FAB-WELD-FIN-ASSY-04", [Route Number]@row = "FAB-WELD-FIN-ASSY-08"), WORKDAY([Collect for OS Finish Due Date]@row, -3), IF(OR([Route Number]@row = "FAB-WELD-FIN-05", [Route Number]@row = "FAB-WELD-FIN-09", [Route Number]@row = "FAB-WELD-FAB-FIN-07", [Route Number]@row = "FAB-WELD-FAB-FIN-08", [Route Number]@row = "FAB-WELD-FAB-FIN-15", [Route Number]@row = "FAB-WELD-FAB-FIN-16", [Route Number]@row = "FAB-WELD-FIN-ASSY-05", [Route Number]@row = "FAB-WELD-FIN-ASSY-09"), WORKDAY([Collect for OS Finish Due Date]@row, -4), IF(OR([Route Number]@row = "FAB-WELD-FAB-FIN-09", [Route Number]@row = "FAB-WELD-FAB-FIN-10", [Route Number]@row = "FAB-WELD-FAB-FIN-17", [Route Number]@row = "FAB-WELD-FAB-FIN-18"), WORKDAY([Collect for OS Finish Due Date]@row, -5), IF(OR([Route Number]@row = "FAB-NOFIN-01", [Route Number]@row = "FAB-NOFIN-07"), WORKDAY([Assembly Start Date]@row, -1), IF(OR([Route Number]@row = "FAB-WELD-NOFIN-03", [Route Number]@row = "FAB-WELD-NOFIN-11"), WORKDAY([Assembly Start Date]@row, -2), IF(OR([Route Number]@row = "FAB-WELD-NOFIN-04", [Route Number]@row = "FAB-WELD-NOFIN-05", [Route Number]@row = "FAB-WELD-NOFIN-08"), WORKDAY([Assembly Start Date]@row, -3), ""))))))))), "OUTSOURCED")
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.7K Get Help
- 406 Global Discussions
- 218 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!