Create formula

E

EOB

How do I create this Formula in cell If K6=4 then E6=1 and IF K6=3 then
E6=2 and IF K6=2 then E6=2 and IF K6=1 then E6=4?
 
R

Ron Coderre

If K6 can only contain 1,2,3 or 4, then maybe this?

E6: =5-K6

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP
 
R

Ron Rosenfeld

How do I create this Formula in cell If K6=4 then E6=1 and IF K6=3 then
E6=2 and IF K6=2 then E6=2 and IF K6=1 then E6=4?

There are many ways.

Here's one:

E6: =IF(ISERR(CHOOSE(K6,4,2,2,1)),"K6 out of range",CHOOSE(K6,4,2,2,1))


Here's another:

E6: =IF(K6=4,1,IF(OR(K6={3,2}),2,IF(K6=1,4,"K6 out of range")))



--ron
 
R

Ron Rosenfeld

If K6 can only contain 1,2,3 or 4, then maybe this?

E6: =5-K6

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP

But E6 = 2 when K6 = 2 or 3


--ron
 
D

Dana DeLouis

Here's one idea as an array formula:

=IF(OR(K6={1,2,3,4}),MOD(226, K6 + 5),#N/A)
 
L

Leo Heuser

EOB said:
How do I create this Formula in cell If K6=4 then E6=1 and IF K6=3 then
E6=2 and IF K6=2 then E6=2 and IF K6=1 then E6=4?

Another option:

In E6:

=INDEX({4,2,2,1},MATCH(K6,{1,2,3,4},0))
 
Top