Nested IFs using AND

Hargreaves
Hargreaves ✭✭
edited 09/28/22 in Formulas and Functions

Basically I am creating a report on our Asbestos Register requested by our H&S team basically they would like the following but in a formula.

If total score is greater than 15 display "Band A" if total score is greater or equal to 10 display "Band B" if total score is less than or equal to 14 display "Band B" if total score is less than or equal to 9 display "Band C" if total score is less than or equal to 6 display "Band D" other wise display "Band E"

We have been playing around with the below formula but is keeps coming up #unparsed

=IF([Total Score]@row > 15, "Band A", IF([Total Score]@row >= 10 AND([Total Score]@row <= 14), "Band B", IF([Total Score]@row >= 7 AND([Total Score]@row <= 9), "Band C", IF([Total Score]@row <= 6 AND([Total Score]@row > 0), "Band D", "Band E"))))

The Risk Bands are as follows:

Band A = 15 Points or more

Band B = 10-14 Points

Band C = 7-9 Points

Band D = 6 Points or less

Band E = 0 Points

Best Answer

  • Paul McGuinness
    Paul McGuinness Overachievers
    Answer ✓

    HI @Hargreaves

    You had the detail correct just the AND structure was placed wrong, below formula is tested and working.

    =IF([Total Score]@row >=15, "Band A", IF(AND([Total Score]@row >= 10,[Total Score]@row <= 14), "Band B", IF(AND([Total Score]@row >= 7,[Total Score]@row <= 9), "Band C", IF(AND([Total Score]@row <= 6,[Total Score]@row >=1), "Band D", "Band E"))))

    Hope that helps

    Thanks

    Paul

Answers

  • Paul McGuinness
    Paul McGuinness Overachievers
    Answer ✓

    HI @Hargreaves

    You had the detail correct just the AND structure was placed wrong, below formula is tested and working.

    =IF([Total Score]@row >=15, "Band A", IF(AND([Total Score]@row >= 10,[Total Score]@row <= 14), "Band B", IF(AND([Total Score]@row >= 7,[Total Score]@row <= 9), "Band C", IF(AND([Total Score]@row <= 6,[Total Score]@row >=1), "Band D", "Band E"))))

    Hope that helps

    Thanks

    Paul

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!