# Formula to add a number in a cell based on other figures

Options

Hi hoping for any help I can get on this.

Using the image as a reference.

Im trying to make [Length score] show a number between 1-4.

the scenario being if the length is 30 days or less it equals 1 and between 30-90 it would show a 2, between 90-150 show a 3 and between 150-365 show a 4.

Would love any help on this people ive tried too many times to make it work!

Thanks!

• ✭✭✭✭✭✭
Options

You should be able to use a nested IF like so:

=IF(Length@row<= 30, 1, IF(Length@row<= 90, 2, IF(Length@row<= 150, 3, IF(Length@row<= 365, 4))))

• ✭✭✭✭✭✭
Options

I hope you're well and safe!

Try something like this. (when it's anything else but numbers, you have to surround them with "")

=IF(Overall score@row<= 11, "S", IF(Overall score@row<= 17, "M", IF(Overall score@row<= 23, "L", IF(Overall score@row<= 50, "XL"))))

Did that work/help?

I hope that helps!

Be safe, and have a fantastic weekend!

Best,

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up, Awesome, or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

• ✭✭✭✭✭✭
Options

You should be able to use a nested IF like so:

=IF(Length@row<= 30, 1, IF(Length@row<= 90, 2, IF(Length@row<= 150, 3, IF(Length@row<= 365, 4))))

• edited 12/16/22
Options

Absolutely perfect thankyou!

Just curious could this same formula be used to replace the numbers with letters i.e,

=IF(Overall score@row<= 11, S, IF(Overall score@row<= 17, M, IF(Overall score@row<= 23, L, IF(Overall score@row<= 50, XL))))

Got of my bum and tried the answer is no!

• ✭✭✭✭✭✭
Options

I hope you're well and safe!

Try something like this. (when it's anything else but numbers, you have to surround them with "")

=IF(Overall score@row<= 11, "S", IF(Overall score@row<= 17, "M", IF(Overall score@row<= 23, "L", IF(Overall score@row<= 50, "XL"))))

Did that work/help?

I hope that helps!

Be safe, and have a fantastic weekend!

Best,

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up, Awesome, or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

• Options

Thankyou both I was literally just about to type my derp realisation at what I was missing as well

=IF([Overall score]@row <= 11, "S", IF([Overall score]@row <= 17, "M", IF([Overall score]@row <= 23, "L", IF([Overall score]@row <= 50, "XL"))))

Turned out the same thanks!

• ✭✭✭✭✭✭
Options

Excellent!

Happy to help!

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!