Possible to use IF statements to find NETWORKDAYS based on specific criteria?

Options

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

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Answer ✓
    Options

    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

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Answer ✓
    Options

    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

  • Jim Masters
    Options

    Thanks, it worked!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!