Compare 2 excel cells

W.E.B
W.E.B used Ask the Experts™
on
Hello,
I'm trying to do a simple compare between 2 cells.
I used
=IF(A1=B1,TRUE,FALSE)
=EXACT(A1,B1)
=MATCH(A1,B1)

Nothing seems to give me the correct answers.
Please see attached. (Cells contain numbers and texts).

Any help is appreciated.
sample-compare.xlsx
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
=IF(A1=B1,"TRUE","FALSE")

Open in new window


You are missing quotes
Jeff DarlingDeveloper Analyst

Commented:
What kind of result do you want?

When I try the =IF(A1=B1,TRUE,FALSE) code in Cell C1 it returns TRUE.

Author

Commented:
Hello,
NOPE,  will not work,
try line 20 it should say false.
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Commented:
try this......

IF(A1=B1,"TRUE","FALSE")
Commented:
There's nothing wrong with your first formula:

=IF(A1=B1,TRUE,FALSE)

Shanan212's solution would give you text for true and false instead of boolean values which you may or may not want.

But, I think the real issue is that caculations are set to manual on your worksheet (far right of Formulas tab).  This means that you won't get the expected results until you recalculate the worksheet.

For typical use, it is fine to leave Excel in automatic calculation.  Exceptions would be high complexity, large data sets, or transient data.

Commented:
try this......

IF(A1=B1,"TRUE","FALSE")
sample-compare.xlsx
Jeff DarlingDeveloper Analyst

Commented:
like this?

example1
Developer Analyst
Commented:
@hanklm  - You got it.  It appears that the sheet is not calculating automatically.

If I go to the cell, press F2 to edit, then press enter, the value changes.  

either that, or just press F9
Ahh you have automatic calculations disabled

Goto formula Tab - Click on 'Calculation Options'

Then click on 'Automatic'
You can even simplify the formula to

=A1=B1

Author

Commented:
That was it,
the automatic calculations was disabled
thanks for all.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial