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
- Smartsheet Customer Resources
- 63K Get Help
- 379 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 304 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!