# Help with 5 nested IF statement

✭✭✭

@Genevieve P. I read your excellent explanation of multiple If statements but only managed to get "Incorrect argument set" instead of "unparseable" Grateful for your review of the following:

=IF(Status@row = "Delayed", "1", IF(OR(Status@row = "Yet to commence", "2", IF(OR(Status@row = "Underway", "3", IF(OR(Status@row = "Ongoing", "4", "5")))))))

The point is to assign a numeric value to each Status so that I can then apply a custom sort order. If there is a better way to do this, I'd love to know.

There is also a COMPLETED status but I figured that would be the default "5" at the end of the equation.

• ✭✭✭✭✭✭

Hi @22Wordsmith,

You don't need the OR statements in your formula as you only have 1 criteria for each number so you can exclude them:

=IF(Status@row = "Delayed", "1", IF(Status@row = "Yet to commence", "2", IF(Status@row = "Underway", "3", IF(Status@row = "Ongoing", "4", "5"))))

This is what is causing your "Incorrect argument set" issues; you would use OR if you have 2+ possibilities for an outcome.

Hope this helps, if you've any questions or comments then just post! 😊

• ✭✭✭✭✭✭

Hi @22Wordsmith,

You don't need the OR statements in your formula as you only have 1 criteria for each number so you can exclude them:

=IF(Status@row = "Delayed", "1", IF(Status@row = "Yet to commence", "2", IF(Status@row = "Underway", "3", IF(Status@row = "Ongoing", "4", "5"))))

This is what is causing your "Incorrect argument set" issues; you would use OR if you have 2+ possibilities for an outcome.

Hope this helps, if you've any questions or comments then just post! 😊

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!