Quizzes & Puzzles3 mins ago
Excel 2010 If Function
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
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
Answers
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")
11:11 Tue 05th Aug 2014
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.