Excel IF formula

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

Guest

I would like to write an IF formula that states the following
IF((A2=A1) and (B2=B1), TRUE, FALSE)
it doesn't seem to work
 
=IF(AND(A2=A1,B2=B1),TRUE,FALSE)

I think the IF part of the formula can be eliminated completely...

=AND(A2=A1,B2=B1)

Rick
 
You are correct. But if the OP decides to do something other than "TRUE"
"FALSE", then they will need to apply the IF statement.
Thanks for the simplification.

Regards,
Paul
 
Now you've got us worried.

As a matter of interest, what values do you have in A1, A2, B1, and B2, that
cause =IF(AND(A2=A1,B2=B1),TRUE,FALSE)
to give a different answer from what you get with =AND(A2=A1,B2=B1) ?
Are you 100% sure that you've got the formulae right? Did you copy them
from the newsgroup into your spreadsheet, or did you retype them?
When you say that =AND(A2=A1,B2=B1) didn't seem to work, what answer did you
get for which inputs?
 
Back
Top