Can I use the "IF" function to create categories in a single column?

Options

I'm doing this formula but I only received the first two criteria. What I'm doing wrong

=IF([Days to Target Due Date]@row > 60, "More than 60 days for Due date", IF([Days to Target Due Date]@row <= 60, "Less than 60 days for due date", (IF([Days to Target Due Date]@row <= 30, "Less than 30 days for due date", IF([Days to Target Due Date]@row <= 5, "Less than 5 days for due date", 0)))))

Best Answers

  • Mark Cronk
    Mark Cronk ✭✭✭✭✭✭
    Answer ✓
    Options

    Hi,

    Nested IFs go in order and the formula stops when it finds a true statement. You have to put your statements in order for it to work. Try:

    =IF([Days to Target Due Date]@row > 60, "More than 60 days for Due date", IF([Days to Target Due Date]@row <= 5, "Less than 5 days for due date", IF([Days to Target Due Date]@row <= 30, "Less than 30 days for due date", "Less than 60 days for due date")))

    Work?

    Mark


    I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

  • Mark Cronk
    Mark Cronk ✭✭✭✭✭✭
    Answer ✓
    Options

    Glad you found a solution. Thank you for contributing to the Community.

    Mark


    I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

Answers

  • Mark Cronk
    Mark Cronk ✭✭✭✭✭✭
    Answer ✓
    Options

    Hi,

    Nested IFs go in order and the formula stops when it finds a true statement. You have to put your statements in order for it to work. Try:

    =IF([Days to Target Due Date]@row > 60, "More than 60 days for Due date", IF([Days to Target Due Date]@row <= 5, "Less than 5 days for due date", IF([Days to Target Due Date]@row <= 30, "Less than 30 days for due date", "Less than 60 days for due date")))

    Work?

    Mark


    I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

  • Thanks!! works perfect!

  • Mark Cronk
    Mark Cronk ✭✭✭✭✭✭
    Answer ✓
    Options

    Glad you found a solution. Thank you for contributing to the Community.

    Mark


    I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!