# Listing multiple criteria in IF statement without nesting

#### Nanaia

##### Board Regular
I was shown once that there's a way to write an IF statement and list multiple criteria without having to write out multiple statements nested together. For example, IF cell E9 contains the numbers 1, 2, 3, 6, 9, or 12 then A9-0.103, if E9 doesn't contain those numbers then I'll continue with my nested statements. [ =IF(E9={1,2,3,6,9,12},A9-0.103,FALSE) ]. I thought you put { } around the several numbers you want the IF to check but it doesn't work. I get a #SPILL! error which tells me I'm doing it wrong. How do I do it correctly?

### Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

##### Well-known Member
Hi Nanaia,

Try
`=IF(OR(E9=1,E9=2,E9=3,E9=6,E9=9,E9=12),A9-0.103,FALSE)`

#### Fluff

##### MrExcel MVP, Moderator
You need to use OR like
Excel Formula:
``=IF(OR(E9={1,2,3,6,9,12}),A9-0.103,FALSE)``

#### Nanaia

##### Board Regular
Using OR made it work the way I needed it to work. Thank you!

#### Fluff

##### MrExcel MVP, Moderator
Glad we could help & thanks for the feedback.

Replies
1
Views
96
Replies
4
Views
92
Replies
1
Views
102
Replies
12
Views
101
Replies
10
Views
781

1,129,890
Messages
5,638,860
Members
417,055
Latest member
SerenaCruz

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back