Solved

Compare 2 excel cells

Posted on 2012-12-28
11
278 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 80 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 13

Expert Comment

by:Jeff Darling
ID: 38727447
like this?

example1
0
 
LVL 13

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

707 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