# Is it possible? Have an IF formula to check certain boxes.

Options
✭✭✭✭

I have two columns Target Age and Target Grade. Can you have a formula that will look at the Target Age column and select the corresponding Target Grade. Both of them are multiple select drop down columns.

If 5-7 is selected, then check the box K-2nd grade, 8-10 is selected, then check the box 3rd-5th grade, 11-13 is selected, then check the box 6th-8th grade, and 14-18 is selected, then check the box 9th-12th grade. I can get it to check one box but not multiple options if needed.

Tags:

• ✭✭✭✭✭✭
Options

I don't think a nested IF will work because the poster wants to have multiple outputs in a single cell based on multiple inputs in the [Target Age] column. I think this may be more appropriate where we string multiple IFs together instead...

=IF(HAS([Target Age]@row,"5-7"), "K-2nd grade" + CHAR(10)) + IF(HAS([Target Age]@row,"8-10"), "3rd-5th grade" + CHAR(10)) + IF(HAS([Target Age]@row,"11-13"), "6th-8th grade" + CHAR(10)) + IF(HAS([Target Age]@row,"14-18"), "9th-12th grade")

• ✭✭✭✭✭✭
Options

CHAR(10) is a line break which is the delimiter in multi-select dropdown columns. This allows it to be displayed and referenced as multiple selections within the same cell as opposed to a single text string.

• ✭✭✭✭✭✭
Options

Hi @Stephanie Tran

Hope you are fine, did you mean you need a multi IF formula ( nested if )?

bassam.khalil2009@gmail.com

• ✭✭✭✭✭✭
Options

Hi @Stephanie Tran

Please check the following formula and convert it to column format formula:

=IF([Target Age]@row = "5-7", "K-2nd grade", IF([Target Age]@row = "8-10", "3rd-5th grade", IF([Target Age]@row = "11-13", "6th-8th grade", IF([Target Age]@row = "14-18", "9th-12th grade", ""))))

bassam.khalil2009@gmail.com

• ✭✭✭✭
Options

Yes, multiple IF with nested IF statements. I tried the formula and it didn't produce anything. It left the box blank even thought in the Target Age column had 5-7, 8-10, 11-13, 14-18 checked.

• ✭✭✭✭✭✭
Options

I hope you're well and safe!

You'd need to use the HAS function because it's a Multi Dropdown type column.

Try something like this.

Did that work/help?

I hope that helps!

Be safe and have a fantastic week!

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 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

I don't think a nested IF will work because the poster wants to have multiple outputs in a single cell based on multiple inputs in the [Target Age] column. I think this may be more appropriate where we string multiple IFs together instead...

=IF(HAS([Target Age]@row,"5-7"), "K-2nd grade" + CHAR(10)) + IF(HAS([Target Age]@row,"8-10"), "3rd-5th grade" + CHAR(10)) + IF(HAS([Target Age]@row,"11-13"), "6th-8th grade" + CHAR(10)) + IF(HAS([Target Age]@row,"14-18"), "9th-12th grade")

• ✭✭✭✭
edited 06/03/21
Options

Thank you everyone.

Paul's formula worked and I was able to convert it to a column formula. This will save me so much time. @Paul Newcome Can you explain the CHAR(10) in the formula? I have never seen that before.

• ✭✭✭✭✭✭
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

CHAR(10) is a line break which is the delimiter in multi-select dropdown columns. This allows it to be displayed and referenced as multiple selections within the same cell as opposed to a single text string.

• ✭✭✭✭
Options

Thank you so much. I didn't know that was possible.

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!