Combined multiple IFs and AND functions

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

Guest

Hi,

I have a problem coming up with an IF statement for the below scenario.

Scenario

A = Y
B = N
where Y is Yes and N is No. The Y and N is entered by the user.

If A= Y and B= Y, execute A1
If A= Y and B= N, execute B1
If A= N and B= Y, execute C1
If A= N and B= N, execute D1

I used an "IF(AND(...,...)", however, I got #Value! for the answer. Can someone please help?

Thanks in advance
 
Hi
one way (if you enter value A in cell E1 and value B in
cell F1)
=IF(E1="Y",IF(F1="Y",A1,IF(F1="N",B1,"not defined")),IF
(E1="N",IF(F1="Y",C1,IF(F1="N",D1,"not defined")),"not
defined"))
-----Original Message-----
Hi,

I have a problem coming up with an IF statement for the below scenario.

Scenario

A = Y
B = N
where Y is Yes and N is No. The Y and N is entered by the user.

If A= Y and B= Y, execute A1
If A= Y and B= N, execute B1
If A= N and B= Y, execute C1
If A= N and B= N, execute D1

I used an "IF(AND(...,...)", however, I got #Value! for
the answer. Can someone please help?
 
This technique doesn't have any error checking

=CHOOSE(SEARCH(E1&F1,"YYNNY"),A1,B1,D1,C1)
 
Dana,

It is genial. Would never have come up with that.

Jack Sons
The Netherlands
 
Thank you. It works.
Appreciate your help.
-----Original Message-----
This technique doesn't have any error checking

=CHOOSE(SEARCH(E1&F1,"YYNNY"),A1,B1,D1,C1)

--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =



(e-mail address removed)... for the answer. Can
someone please help?


.
 
Thank you. This works too. :)
Appreciate it.
-----Original Message-----
Hi
one way (if you enter value A in cell E1 and value B in
cell F1)
=IF(E1="Y",IF(F1="Y",A1,IF(F1="N",B1,"not defined")),IF
(E1="N",IF(F1="Y",C1,IF(F1="N",D1,"not defined")),"not
defined"))
the
the answer. Can someone please help?
.
 

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