Checking cells are = and return a value

N

nev1956

Hi dose any one know how to ckeck if two or more cells are true and then
return a value e.g if one cell = 10 and another cell =20 then return a value
of another cell or what ever it needs to be
 
D

Dave Peterson

Say your two cells are A1 and A2. And you want to bring back the value of A3 if
A1=10 and A2=20. But you want to bring back a value from A4 if at least one of
them is different (a1 different from 10 or a2 different from 20):

=if(and(a1=10,a2=20),a3,a4)

You could even show text:
=if(and(a1=10,a2=20),a3,"A1 and A2 are not what they should be!")

You may want to provide more details if this doesn't help.
 
Top