IF Formula

glerwell

Well-known Member
Hi

I want to create a formula for the following conditions:

IF K11 is "NO" then 1 is displayed
IF K11 is "1" then 2 is displayed
IF K11 is "2" then 3 is displayed
IF K11 is "3" then 4 is displayed

I've tried myself but it only works if "NO" is K11, if 1-3 in K11 then the 0 is returned.

Thanks

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

facethegod

Well-known Member
Is this what you need

Code:
``=LOOKUP(A11,{"1","2","3","NO"},{2,3,4,1})``

glerwell

Well-known Member
that returns N/A for anything 2,3,4 is in K11

glerwell

Well-known Member
If I change 1,2,3 to ONE, TWO, THREE I can use the following formula:

=IF(K11="NO",1,0)+IF(K11="TWO",2,0)+IF(K11="THREE",3,0)+IF(K11="FOUR",4,0)

but I owuld prefer to be able to use 1,2,3.

VoG

Legend
Are the "1", "2" and "3" in K11 actually numbers, not text? If so you need to lose the "s in the formulas.

glerwell

Well-known Member
VoG II - thats was problem and I've now sorted it.

facethegod - thanks for the formula.

cheers guys

lenze

Legend
=IF(K11="NO",1,Choose(K11,2,3,4,))

lenze

Seti

Well-known Member
Maybe this?

=IF(K11="NO",1,K11+1)

assuming K11 can only be NO, 1, 2 or 3

Replies
3
Views
218
Replies
10
Views
377
Replies
1
Views
406
Replies
6
Views
433
Replies
5
Views
91

1,191,518
Messages
5,987,066
Members
440,074
Latest member
Emmanuelian

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.

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