Can you combine if and or formulas

Options

Here is the formula that I currently have and works great currently:

=IF(COUNTIFS({UCA App E#}, [E #]@row, {EPU approved}, true) > 0, true, false)

First is the match the text in "UCA app e#" and "E #", but also needs "EPU approved" which is a checkbox, to be 'checked'. I need to add a second field that is a check box to also bring back true if 'checked'.

So the logic would be, IF a match to the text in E# field is yes, AND either "EPU approved" OR "logged for future" is checked, then bring back the value of true (also a checkbox).

Best Answer

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer ✓
    Options

    Hi @Nate Ensor

    Looks like you're missing a > sign before the second 0, and the "true" / "false" statement at the end.

    Try this:

    =IF(OR(COUNTIFS({UCA App E#}, [Entegra E #]@row, {EPU approved}, true) > 0, COUNTIFS({UCA App E#}, [Entegra E #]@row, {approved for future}, true) >0), true, false)

    Cheers,

    Genevieve

Answers

  • Darren Mullen
    Darren Mullen ✭✭✭✭✭✭
    edited 12/20/22
    Options

    @Nate Ensor You could wrap a couple CountIFs in an or() .

    OR(COUNTIFS({UCA App E#}, [E #]@row, {EPU approved}, true) > 0 , COUNTIFS({UCA App E#}, [E #]@row, {logged for future}, true) >0)

    Then put that in your IF statement logic expression

  • Nate Ensor
    Nate Ensor ✭✭✭✭✭
    Options

    ok I gotcha. Makes sense, countifs match listed twice combined with the true statement for both other columns.

    I still can't quite put it together though, I'm missing something or it's getting late lol...but I'm getting the unparseable error. Not as simple as just putting "IF" at the beginning?

    =IF(OR(COUNTIFS({UCA App E#}, [Entegra E #]@row, {EPU approved}, true) > 0, COUNTIFS({UCA App E#}, [Entegra E #]@row, {approved for future}, true) 0))

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer ✓
    Options

    Hi @Nate Ensor

    Looks like you're missing a > sign before the second 0, and the "true" / "false" statement at the end.

    Try this:

    =IF(OR(COUNTIFS({UCA App E#}, [Entegra E #]@row, {EPU approved}, true) > 0, COUNTIFS({UCA App E#}, [Entegra E #]@row, {approved for future}, true) >0), true, false)

    Cheers,

    Genevieve

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!