Using all three If, And, Or function

Is there a way to use If, And, Or altogether? What I am looking for is,

  • If Task 1 Or Task 2 shows Fail, check New Task. And if On Going or Resolved is checked, uncheck New Task.
Smartsheet_Test.png

Best Answers

  • MarceHolzhauzen
    MarceHolzhauzen ✭✭✭✭✭✭
    Answer ✓

    Hi @Ned Flanders

    First of all, yes you could. But you need to understand how if formulas function in this instance. An if formula runs until it finds a true statement, and then it executes and stops reading. So you need to make sure that you do this in the correct sequence. Which statement will be the one that overrides all.

    You can do one of two options:

    1. =IF(OR([On Going]@row = 1, Resolved@row = 1), 0, IF(OR([Task 1]@row = "Fail", [Task 2]@row = "Fail"), 1, 0))

    This formula gives preference to the On Going / Resolved column(s) which means, if you tick one of those boxes, it will untick "New Task"

    or

    2. =IF(OR([Task 1]@row = "Fail", [Task 2]@row = "Fail"), 0, IF(OR([On Going]@row = 1, Resolved@row = 1), 1, 0))
    This formula will give preference to the Task 1/Task 2 columns, which means even if you tick the box for On Going or Resolved, the Task Status will take preference.

    I hope this helps

    Marcé Holzhauzen
    Solution and Delivery Consultant with Award Winning Partner
    Want to meet?Check my availability

    Find me on:LinkedIn | YouTube

    www.prodactive.co.uk

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

  • Nick Korna
    Nick Korna Community Champion
    Answer ✓

    Hi @Ned Flanders,

    You can use automation for this, something like the below:

    image.png

    Hope this helps, but if I've misunderstood something or you've any problems/questions just let us know!

Answers

  • MarceHolzhauzen
    MarceHolzhauzen ✭✭✭✭✭✭
    Answer ✓

    Hi @Ned Flanders

    First of all, yes you could. But you need to understand how if formulas function in this instance. An if formula runs until it finds a true statement, and then it executes and stops reading. So you need to make sure that you do this in the correct sequence. Which statement will be the one that overrides all.

    You can do one of two options:

    1. =IF(OR([On Going]@row = 1, Resolved@row = 1), 0, IF(OR([Task 1]@row = "Fail", [Task 2]@row = "Fail"), 1, 0))

    This formula gives preference to the On Going / Resolved column(s) which means, if you tick one of those boxes, it will untick "New Task"

    or

    2. =IF(OR([Task 1]@row = "Fail", [Task 2]@row = "Fail"), 0, IF(OR([On Going]@row = 1, Resolved@row = 1), 1, 0))
    This formula will give preference to the Task 1/Task 2 columns, which means even if you tick the box for On Going or Resolved, the Task Status will take preference.

    I hope this helps

    Marcé Holzhauzen
    Solution and Delivery Consultant with Award Winning Partner
    Want to meet?Check my availability

    Find me on:LinkedIn | YouTube

    www.prodactive.co.uk

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

  • Nick Korna
    Nick Korna Community Champion
    Answer ✓

    Hi @Ned Flanders,

    You can use automation for this, something like the below:

    image.png

    Hope this helps, but if I've misunderstood something or you've any problems/questions just let us know!

  • Thank you all! This saved me some headaches and they worked as they should.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!