IF AND....

mragans23
mragans23 ✭✭
edited 10/16/23 in Formulas and Functions

I am trying to have a column show Green when the status Does not = Contacted - Need to Follow Up AND when Attempt # is less than or equal to 2 (Attempt # = 3 or 4 it should be yellow and 5 or more should be red). HELP :)

=IF(AND(Status@row <> "Contacted - Need to Follow up", "green", IF(AND([Attempt #]@row <= 2, "green", IF([Attempt #]@row = 3, "yellow", IF([Attempt #]@row = 4, "yellow", IF([Attempt #]@row > 4, "red")))))))

Answers

  • Carson Penticuff
    Carson Penticuff ✭✭✭✭✭✭

    This will also do some verification to ensure the symbols are not being populated for blank rows or any non-numerical values.


    =IF(AND(Status@row <> "Contacted - Need to Follow up", Status@row <> "", ISNUMBER([Attempt #]@row)), IF([Attempt #]@row <= 2, "Green", IF([Attempt #]@row <= 4, "Yellow", IF([Attempt #]@row > 4, "Red"))))

  • THanks, i got red and yellow but no greens.


  • Carson Penticuff
    Carson Penticuff ✭✭✭✭✭✭

    In your screenshot, none of the values in Attempt # are 2 or less. Are there rows elsewhere that are 2 or less?

  • I appologize if I said this wrong (good possibility as I have been working on this all day).


    If status is not Contacted- Need to Follow Up, it want it to be green.

    If it is Contacted - Need to Follow Up, if it is 2 or less than green. If it is 3 or 4 then yellow and if 5 or more red. What i need to see is who we have contacted and need to follow up with and code it accordingly. If we have scheduled a meeting, then green is great.

  • Carson Penticuff
    Carson Penticuff ✭✭✭✭✭✭

    Yes, I definitely misunderstood. No worries, give this one a try:

    =IF(Status@row <> "", IF(Status@row <> "Contacted - Need to Follow up", "Green", IF(ISNUMBER([Attempt #]@row), IF([Attempt #]@row <= 2, "Green", IF([Attempt #]@row <= 4, "Yellow", "Red")))))

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!