# IF statement issue, can seem to get it to work

Options
✭✭✭

I can do it in Excel but cant seem to get it right in Smartsheet.

I need to categorize for an age analysis - Current, 30 days, 60 days, 90 days etc.

=if(([Aging Days]@row>30,"Current"),if([Aging Days]@row>30<60,"30 Days"),if([Aging Days]@row>60<90,"60 Days"),if([Aging Days]@row>90<120,"90 Days"),if([Aging Days]@row>120<150,"120 Days"),if([Aging Days]@row>150<180,"150 Days"),if([Aging Days]@row>180,"180 Days"))

• ✭✭✭✭✭✭
Options

Try this...

=IF([Aging Days]@row > 180, "180 Days", IF([Aging Days]@row > 150, "150 Days", IF([Aging Days]@row > 120, "120 Days", IF([Aging Days]@row > 90, "90 Days", IF([Aging Days]@row > 60, "60 Days", IF([Aging Days]@row > 30, "30 Days", "Current"))))))

• ✭✭✭
Options

Thanks @Paul Newcome I managed to get it right.

=IF([Ageing days]@row < 30, "Current", IF([Ageing days]@row < 60, "30 Days", IF([Ageing days]@row < 90, "60 Days", IF([Ageing days]@row < 120, "90 Days", IF([Ageing days]@row < 150, "120 Days", IF([Ageing days]@row < 150, "150 Days", "180 Days"))))))

• ✭✭✭✭✭✭
Options

Yup. There you go. Same concept but in reverse order. Hahaha.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!