# Return true or false for multiple selection question

Options
✭✭
edited 06/22/22

Hi,

I have some multiple selection questions to grade and not sure what formula to use.

So there are A,B,C,D,X for the selection and the correct answer is A,C.

I want a true response for people who select A&C only, any other types of combination needs to return as false.

I tried AND formula, but it return as true even when people select A,C,D or any combinations that contains A&C. So it did not work out for what I was looking for.

Any suggestions? Thanks!

• ✭✭✭✭✭✭
Options

Try this...

=IF([Column Name]@row = "A" + CHAR(10) + "C", "true", "false")

• ✭✭✭✭✭✭
Options

Are all of the options listed in the same cell, or are they spread out across multiple columns?

• ✭✭
Options

They are in the same cell.

• ✭✭✭✭✭✭
Options

Try this...

=IF([Column Name]@row = "A" + CHAR(10) + "C", "true", "false")

• ✭✭✭✭✭✭
Options

Hi,

Try this, where "[Column2]" is the name of your column containing the multiple selection.

=IF(OR(CONTAINS("B", [Column2]@row), CONTAINS("D", [Column2]@row), CONTAINS("X", [Column2]@row)), "FALSE Not AC", IF(AND(CONTAINS("A", [Column2]@row), (CONTAINS("C", [Column2]@row))), "TRUE AC Only", "FALSE Not AC"))

• ✭✭✭✭✭✭
Options

@Paul Newcome - thanks for showing how to use CHAR(10)!

• ✭✭
edited 06/22/22
Options

Thank you @Paul Newcome! They work perfectly.

@ker9 Thank you for your input!

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!