• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

Compare 2 excel cells

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
0
W.E.B
Asked:
W.E.B
  • 3
  • 2
  • 2
  • +3
5 Solutions
 
Shanan212Commented:
=IF(A1=B1,"TRUE","FALSE")

Open in new window


You are missing quotes
0
 
Jeff DarlingDeveloper AnalystCommented:
What kind of result do you want?

When I try the =IF(A1=B1,TRUE,FALSE) code in Cell C1 it returns TRUE.
0
 
W.E.BAuthor Commented:
Hello,
NOPE,  will not work,
try line 20 it should say false.
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
fb1990Commented:
try this......

IF(A1=B1,"TRUE","FALSE")
0
 
hanklmCommented:
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.
0
 
fb1990Commented:
try this......

IF(A1=B1,"TRUE","FALSE")
sample-compare.xlsx
0
 
Jeff DarlingDeveloper AnalystCommented:
like this?

example1
0
 
Jeff DarlingDeveloper AnalystCommented:
@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
0
 
Shanan212Commented:
Ahh you have automatic calculations disabled

Goto formula Tab - Click on 'Calculation Options'

Then click on 'Automatic'
0
 
Saqib Husain, SyedEngineerCommented:
You can even simplify the formula to

=A1=B1
0
 
W.E.BAuthor Commented:
That was it,
the automatic calculations was disabled
thanks for all.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 3
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now