Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

true
true
false
false
true
false
false

Any help appreciated, Ted

share|improve this question

3 Answers 3

up vote 37 down vote accepted

use the built in 'exact' function which is exact-ly for this purpose. =exact(A1, B1)

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").

share|improve this answer

In the above solution, and in general for functions you should use the list separator that is defined in your machine. Usually it is comma (,) but I changed it on my machine to pipe (|). So my function looks like =IF(A1=B1|"true"|"false")

--Ramesh.

share|improve this answer

protected by Community Nov 22 '13 at 1:51

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.