IF Statement

Options

Good afternoon,

I'm trying to write an IF/OR statement utilizing the following:

=IF(OR(Resource Cost Category@row = Professional Fees, 43.75, IF(OR(Resource Cost Category@row = FTE/No Charge, 30)))

Unfortunately, I'm getting a #UNPARSEABLE error message.

Any help would be appreciated!

Jason

Best Answer

  • SoS | Dan Palenchar
    SoS | Dan Palenchar ✭✭✭✭✭✭
    Answer ✓
    Options

    1st off, a couple general rules you need to follow with writing formulas:

    1. Any column name that is multiple words (e.g., Resource Cost Category) needs to be in brackets, so [Resource Cost Category]@row for example,
    2. Any string (text) needs to be in quotes, so where you have Professional Fees this would not to literally be "Professional Fees"

    Not following either of the above rules will throw an error.

    What are you trying to accomplish? I am guessing you want your destination column (Hrs/week) to show 43.75 and 30.00 when Resource Cost Category is Professional Fees and FTE/NO Charge, respectively. If this is correct the OR() functions are not needed and getting in the way. Just use:

    =IF([Resource Cost Category]@row="Professional Fees", 34.75, IF([Resource Cost Category]@row="FTE/NO Charge", 30.00))

    I'm writing this off the top of my head and not testing in an actual Sheet so there may be an error due to a typo or what not but it should be close if not correct.

    You can continue to stack IF() statements for other categories as needed.

    👨🏼💻 Dan Palenchar | School of Sheets Solutions Consulting | Smartsheet Aligned Gold Partner

    If this helped, help me & the SSC by accepting and reacting w/ 💡insightful, ⬆️ Vote Up, and/or ❤️Awesome!

    PS - If you have a follow up response tag me @SoS | Dan Palenchar so I get notified of your reply!

Answers

  • SoS | Dan Palenchar
    SoS | Dan Palenchar ✭✭✭✭✭✭
    Answer ✓
    Options

    1st off, a couple general rules you need to follow with writing formulas:

    1. Any column name that is multiple words (e.g., Resource Cost Category) needs to be in brackets, so [Resource Cost Category]@row for example,
    2. Any string (text) needs to be in quotes, so where you have Professional Fees this would not to literally be "Professional Fees"

    Not following either of the above rules will throw an error.

    What are you trying to accomplish? I am guessing you want your destination column (Hrs/week) to show 43.75 and 30.00 when Resource Cost Category is Professional Fees and FTE/NO Charge, respectively. If this is correct the OR() functions are not needed and getting in the way. Just use:

    =IF([Resource Cost Category]@row="Professional Fees", 34.75, IF([Resource Cost Category]@row="FTE/NO Charge", 30.00))

    I'm writing this off the top of my head and not testing in an actual Sheet so there may be an error due to a typo or what not but it should be close if not correct.

    You can continue to stack IF() statements for other categories as needed.

    👨🏼💻 Dan Palenchar | School of Sheets Solutions Consulting | Smartsheet Aligned Gold Partner

    If this helped, help me & the SSC by accepting and reacting w/ 💡insightful, ⬆️ Vote Up, and/or ❤️Awesome!

    PS - If you have a follow up response tag me @SoS | Dan Palenchar so I get notified of your reply!

  • Jason Voorhies
    Options

    @Dan Palenchar you absolutely crushed it!! There were definitely a few rookie mistakes in the formula for sure, so thank you very very much. You even managed to understand what I was attempting to do with the rest of the statement, so you managed to kill two of my birds with one response.

    Seriously, thank you!