Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to compare two strings in excel and determine if they are equal, the strings are in adjacent cells. For example, given:

apple   apple
water   water
pear    carrot
apple   water
dog     dog
pear    carrot
Apple   apple

the formula on the third column should give me:


Any help appreciated, Ted

share|improve this question
up vote 67 down vote accepted

Use the built in exact() function which is exact-ly for this purpose:

=exact(A1, B1)

It will return true if the strings are identical.

share|improve this answer
I never noticed that equals was case insensitve before. Thanks. – Kevin Manning May 16 '11 at 12:48

If case in your third column result is not important, =A1=B1. If case in your result does matter, =IF(A1=B1,"true","false").

This comparison (=A1=B1) is slightly different than the exact comparison since case sensitivity of the characters is not compared. The exact function also compares the character case. If you need case sensitivity checked and specify your own results, use =IF(EXACT(A1,B1),"true","false").

share|improve this answer

You must log in to answer this question.

protected by Community Nov 22 '13 at 1:51

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .