Solved

Compare 2 excel cells

Posted on 2012-12-28
11
264 Views
Last Modified: 2012-12-28
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
Comment
Question by:W.E.B
  • 3
  • 2
  • 2
  • +3
11 Comments
 
LVL 13

Assisted Solution

by:Shanan212
Shanan212 earned 80 total points
ID: 38727405
=IF(A1=B1,"TRUE","FALSE")

Open in new window


You are missing quotes
0
 
LVL 12

Expert Comment

by:Jeff Darling
ID: 38727412
What kind of result do you want?

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

Author Comment

by:W.E.B
ID: 38727415
Hello,
NOPE,  will not work,
try line 20 it should say false.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Assisted Solution

by:fb1990
fb1990 earned 40 total points
ID: 38727437
try this......

IF(A1=B1,"TRUE","FALSE")
0
 
LVL 2

Assisted Solution

by:hanklm
hanklm earned 40 total points
ID: 38727443
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
 
LVL 1

Expert Comment

by:fb1990
ID: 38727446
try this......

IF(A1=B1,"TRUE","FALSE")
sample-compare.xlsx
0
 
LVL 12

Expert Comment

by:Jeff Darling
ID: 38727447
like this?

example1
0
 
LVL 12

Accepted Solution

by:
Jeff Darling earned 40 total points
ID: 38727454
@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
 
LVL 13

Assisted Solution

by:Shanan212
Shanan212 earned 80 total points
ID: 38727457
Ahh you have automatic calculations disabled

Goto formula Tab - Click on 'Calculation Options'

Then click on 'Automatic'
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 38727469
You can even simplify the formula to

=A1=B1
0
 

Author Closing Comment

by:W.E.B
ID: 38727490
That was it,
the automatic calculations was disabled
thanks for all.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question