# Multiple "IF"s in a Function?

Hi,

I am trying to create a column which will say "YES", when another column, "Expiry Date", is expired (past today), and when a third column is " NOT GLP".

However, I want it to say "NO", when the third column "IS GLP", and the expiry date is expired by less than 1 year.

(If it is expired by more than a year, then it should say "YES", even though it is GLP).

I thought of this formula (and a lot of other variations), but I just cannot seem to make it work:

=IF(AND(TODAY() > [Expiration Date]1, GLP1 = "NO"), "YES", IF(AND(TODAY(365) > [Expiration Date]1, [GLP]1 = “YES”), "NO"))

• ✭✭✭✭✭✭

Try this...

=IF(GLP@row <> "NOT GLP", IF([Expiration Date]@row < TODAY(), "YES", "NO"), IF([Expiration Date]@row < TODAY(-365), "Yes", "NO"))

• ✭✭✭✭✭✭

Try this...

=IF(GLP@row <> "NOT GLP", IF([Expiration Date]@row < TODAY(), "YES", "NO"), IF([Expiration Date]@row < TODAY(-365), "Yes", "NO"))

• Wow, it works great! :D

Thank you so much for your help! I really appreciate it!

I used your exact formula (just replacing the "NOT GLP" by "YES", as I needed the opposite: that's my fault though, its hard to explain exactly what you need in words), and I tested it a few times, and it works perfectly!

Thanks again, you really saved me a lot of hours of confusion :)

• ✭✭✭✭✭✭

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!