If and statements

I would like to create a formula that will check the “MISSED” box if the “# OF VISITS LW” is less than the “Tx PLAN” number. But I would like to have the “# OF VISITS TW” supersede the prior. For example, If the “# OF VISITS TW” is equal to or greater than the “Tx PLAN” number, the checkbox would be unchecked or if the “# OF VISITS TW” is less than “Tx PLAN”, it remains checked.

 


Best Answer

Answers

  • Julie Fortney
    Julie Fortney Overachievers
    Answer ✓

    Hi! Try this formula:

    =IF([# OF VISITS TW]@row >= [Tx PLAN]@row, false, IF([# OF VISITS TW]@row < [Tx PLAN]@row, true, IF([# OF VISITS LW]@row < [Tx PLAN]@row, true)))

  • Thank you Julie! That was perfect.

  • The formula needs to be altered where if the patient is checked for Troubled there should not be a check for Missed. I tried changing the formula but it did not work.

    =IF([# OF VISITS TW]@row >= [Tx PLAN]@row, false, IF([# OF VISITS TW]@row < [Tx PLAN]@row, true, IF([# OF VISITS LW]@row < [Tx PLAN]@row, true)))


  • Genevieve P.
    Genevieve P. Employee Admin

    Hi @efleming

    You can add another IF statement to your formula, but make sure this is the first one for it to look at:

    =IF([TROUB.]@row = 1, 0,

    So something like:

    =IF([TROUB.]@row = 1, 0, IF([# OF VISITS TW]@row >= [Tx PLAN]@row, false, IF([# OF VISITS TW]@row < [Tx PLAN]@row, true, IF([# OF VISITS LW]@row < [Tx PLAN]@row, true))))


    Cheers,

    Genevieve

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!