# IF OR Formula

Options

I'm trying to come up with a formula that if the user selects either one choice or multiple choices in the same category it will equal the same or highest amount.

For instance:

Dog, cat = 3

Mouse, rat = 2

Snake, lizard = 1

If a user selects dog it needs to equal 3. However, if a user chooses dog and cat it also equals 3. The last example is if a user selects dog and lizard it will equal the highest amount of 3.

Having problems coming up with a formula for this. Any help on this would be greatly appreciated.

• ✭✭✭✭✭✭
Options

Hi @KCope21,

Your formula would look like this:

=IF(OR(HAS([Animal dropdown]@row, "Dog"), HAS([Animal dropdown]@row, "Cat")), 3, IF(OR(HAS([Animal dropdown]@row, "Mouse"), HAS([Animal dropdown]@row, "Rat")), 2, IF(OR(HAS([Animal dropdown]@row, "Snake"), HAS([Animal dropdown]@row, "Lizard")), 1)))

Sample data/output:

Hope this helps, but if you've any problems/questions then just let us know!

• ✭✭✭✭✭
Options
```=IF(OR(
CONTAINS("cat", Animal@row),
CONTAINS("dog", Animal@row)), 3,

IF(OR(
CONTAINS("mouse", Animal@row),
CONTAINS("rat", Animal@row)), 2,

IF(OR(
CONTAINS("lizard", Animal@row),
CONTAINS("snake", Animal@row)), 1,

"")
```

...

• Options

Tried this and its coming back as unparseable.

• Options

Also tried this one and its coming back as unparseable.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!