multiple if or statement

joebloggs

New Member
Joined
Dec 7, 2016
Messages
9
I'm looking to return the value of 1 or 2 or 3 in a cell IF a cell contains another specific number in a range

example
the result will be display in 1 cell (A5)

IF cell A4 = 2 or 5 or 8 or 11 then A5 = 1

IF cell A4 = 1 or 4 or 7 or 10 then A5 = 2

IF cell A4 = 3 or 6 or 9 or 12 then A5 = 3

Any help will be appreciated.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
=IF(OR(A4=2,A4=5,A4=8,A4=11),1,IF(OR(A4=1,A4=4,A4=7,A4=10),2,IF(OR(A4=3,A4=6,A4=9,A4=12),3,"N/A")))

"N/A" is used if A4 does not equal any of the numbers,
 
Upvote 0

Forum statistics

Threads
1,215,455
Messages
6,124,937
Members
449,196
Latest member
Maxkapoor

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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