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
- 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!