Donate SIGN UP

Excel 2010 If Function

Avatar Image
Old_Geezer | 12:01 Tue 05th Aug 2014 | Computers
4 Answers
I must be missing something obvious but a function I swear has worked for me many times in the past is not doing so now, and I'm hoping someone can come up with a solution.

In one cell I have some text. Call it A1.
In another I have the same letters but in a different case. Call it A2.
In a third cell I type =IF(A1=A2,"Identical","Different")

Despite it being blatantly obvious they are different, as the case is not the same, the third cell insists they are identical.

How can I stop it lying to me and come up with the correct answer ?

TIA
Gravatar

Answers

1 to 4 of 4rss feed

Avatar Image
You need to use the EXACT formula which gives a true or false answer, to get what you want you need to wrap that in an IF, so =IF(EXACT(A1,B1),"Identical","Different")
12:11 Tue 05th Aug 2014
You need to use the EXACT formula which gives a true or false answer, to get what you want you need to wrap that in an IF, so =IF(EXACT(A1,B1),"Identical","Different")
I think the answer above will work. The reason your approach is breaking down is probably because the comparison A1=A2 relies on the cell contents being pure numbers. If they aren't then the numerical value of the cell is probably taken to be zero, or perhaps "Null". In which case both cells have the same numerical value of null but a different content. So a different logical test will be needed.
Question Author
I shall give it a try thanks. But I swear I've used this simple IF in the past with success. Very confusing.
Question Author
Yes that worked fine, thanks.

1 to 4 of 4rss feed

Do you know the answer?

Excel 2010 If Function

Answer Question >>