?
Solved

Compare 2 excel cells

Posted on 2012-12-28
11
Medium Priority
?
280 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +3
11 Comments
 
LVL 13

Assisted Solution

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

Open in new window


You are missing quotes
0
 
LVL 13

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Assisted Solution

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

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

Assisted Solution

by:hanklm
hanklm earned 160 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 13

Expert Comment

by:Jeff Darling
ID: 38727447
like this?

example1
0
 
LVL 13

Accepted Solution

by:
Jeff Darling earned 160 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 320 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 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