Create formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
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
 
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
 
Here's one idea as an array formula:

=IF(OR(K6={1,2,3,4}),MOD(226, K6 + 5),#N/A)
 
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))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top