matching cells

D

deepokerman

I am looking for a formula that if the cell A1 and A2 match then cell A3 will
be 4
if they do not match then 0

example: A1 has YES and A2 has YES then cell A3 will be 4
IF both cells are blank the A3 would say 4
A1 has YES and A2 has NO then cell A3 will be 0
A1 has NO and A2 has YES then cell A3 will be 0

Is this possible?
Thanks
 
D

deepokerman

Yes, that worked. But what would i have to do to make cell A4 be 4 if cellS
A1, A2 A3 are the same and have cell A4 be 0 if A1 A2 A3 do not match in any
order?
 
P

p45cal

=if(and(a1=a2,a2=a3),4,0)

or a la Rick:
=4*(AND(A1=A2,A2=A3))

no, I got that wrong:
=4*(A1=A2)*(A3=A3
 

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

Top