# Help with Nested Formula

✭✭

Hello, I've got the below formula to sorta work, but the problem is that it is not giving me a return if my value falls outside of the last formula (>500). I even tried the second formula, but it put everything to 5 no matter what. See screenshot below (1st formula). Thanks in advance.

=IF(Lipemia@row < 40, "0", IF(Lipemia@row = 40 - 99, "1", IF(Lipemia@row = 100 - 199, "2", IF(Lipemia@row = 200 - 299, "3", IF(Lipemia@row = 300 - 500, "4", IF(Lipemia@row > 500, "5"))))))

=IF(Lipemia@row < 40, "0", IF(Lipemia@row = 40 - 99, "1", IF(Lipemia@row = 100 - 199, "2", IF(Lipemia@row = 200 - 299, "3", IF(Lipemia@row = 300 - 500, "4", "5")))))

Carol

• Try this:

=IF(Lipemia@row < 40, "0", IF(Lipemia@row < 100, "1", IF(Lipemia@row < 200, "2", IF(Lipemia@row < 300, "3", IF(Lipemia@row <= 500, "4", IF(Lipemia@row > 500, "5"))))))

• ✭✭

@Steve Rohrdanz Thank you! I was spinning my wheels and this worked perfectly!

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!