Possible to use IF statements to find NETWORKDAYS based on specific criteria?
I'm currently trying to do some analysis on quote data, and I'm trying to determine the NETWORKDAYS between two columns of dates only if the "Quote Type" is one of a few types in my Quote Type multi-select dropdown menu.
I've created two different columns to use the NETWORKDAYS formula with an IF formula to separate my MRO vs. Project values of NETWORKDAYS.
The three column fields I'm taking into account are "Quote Type", "Date Received", and "Date Quoted" in my formula. I'd like the formula to return the NETWORKDAYS numeric value only if my "Quote Type" is two of four Quote Types for MRO in one column, and then the other two of four Quote Types for Projects in another column. If the Quote Type doesn't match any of the values, I'd like the formula to return a blank value or no value.
My formula's are listed below, but I keep getting the #UNPARSEABLE error code message.
MRO column formula:
=IF([Quote Type]@row = "Buy - MRO", NETWORKDAYS([Date Received]@row,[Date Quoted]@row),""),OR(IF([Quote Type]@row = "Budgetary - MRO", NETWORKDAYS([Date Received]@row,[Date Quoted]@row),""))
Project column formula:
=IF([Quote Type]@row = "Buy - Project", NETWORKDAYS([Date Received]@row,[Date Quoted]@row),""),OR(IF([Quote Type]@row = "Budgetary - Project", NETWORKDAYS([Date Received]@row,[Date Quoted]@row),""))
What am I doing wrong here?
Best Answer
-
Hey @Jim Masters
It looked like you had the OR in the wrong place. The function reads 'If this or that, then this"
MRO column formula:
=IF(OR([Quote Type]@row = "Buy - MRO", [Quote Type]@row = "Budgetary - MRO"), NETWORKDAYS([Date Received]@row,[Date Quoted]@row))
Project column formula:
=IF(OR(Quote Type]@row = "Buy - Project", [Quote Type]@row = "Budgetary - Project"), NETWORKDAYS([Date Received]@row,[Date Quoted]@row))
cheers,
Kelly
Answers
-
Hey @Jim Masters
It looked like you had the OR in the wrong place. The function reads 'If this or that, then this"
MRO column formula:
=IF(OR([Quote Type]@row = "Buy - MRO", [Quote Type]@row = "Budgetary - MRO"), NETWORKDAYS([Date Received]@row,[Date Quoted]@row))
Project column formula:
=IF(OR(Quote Type]@row = "Buy - Project", [Quote Type]@row = "Budgetary - Project"), NETWORKDAYS([Date Received]@row,[Date Quoted]@row))
cheers,
Kelly
-
Thanks, it worked!
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!