'IF' statement help!! please!!

  • Thread starter Thread starter digitallifeform
  • Start date Start date
D

digitallifeform

Ok, what i am trying to acomplish and what i have acomplished
unfortunately dont match sooo....

Here is an example of what i want to do:

Logical test: 'N19' is the same as 'P19' AND 'E19' is the same as
'B2'

So far i have got: =IF((N19=P19)+(E19=$B$2),$A$5,$A$6)

But this this doesnt work, at the moment if either statement is true it
counts it a as a true statement, but i need both bits to be true.

Hope that makes some sense. PLEASE HELP ME!!

Many thanks

Darren
 
Use if with and

=IF(AND(N19=P19,E19=$B$2),$A$5,$A$6)

or

=IF((N19=P19)*(E19=$B$2),$A$5,$A$6)
 
Hi Darren

Think of True as 1 and False as 0:
=IF((N19=P19)+(E19=$B$2),$A$5,$A$6)
says IF(1+0,this,that)

Try instead
=IF((N19=P19)*(E19=$B$2),$A$5,$A$6)
which is IF(1*0,this,that)
 
You can do this two ways.

1) Use the AND function as your condition: AND(N19=P19,E19=$B$2)

2) Change your + to a *. This way 0*0 = False, 0*1=1*0=False, and 1*1=True

Good Luck,
Mark Graesser
(e-mail address removed)

----- digitallifeform wrote: -----

Ok, what i am trying to acomplish and what i have acomplished
unfortunately dont match sooo....

Here is an example of what i want to do:

Logical test: 'N19' is the same as 'P19' AND 'E19' is the same as
'B2'

So far i have got: =IF((N19=P19)+(E19=$B$2),$A$5,$A$6)

But this this doesnt work, at the moment if either statement is true it
counts it a as a true statement, but i need both bits to be true.

Hope that makes some sense. PLEASE HELP ME!!

Many thanks

Darren
 
Back
Top