Solved

Compare 2 excel cells

Posted on 2012-12-28
11
241 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:Wass_QA
  • 3
  • 2
  • 2
  • +3
11 Comments
 
LVL 13

Assisted Solution

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

Open in new window


You are missing quotes
0
 
LVL 12

Expert Comment

by:Jeff Darling
Comment Utility
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:Wass_QA
Comment Utility
Hello,
NOPE,  will not work,
try line 20 it should say false.
0
 
LVL 1

Assisted Solution

by:fb1990
fb1990 earned 40 total points
Comment Utility
try this......

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

Assisted Solution

by:hanklm
hanklm earned 40 total points
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Expert Comment

by:fb1990
Comment Utility
try this......

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

Expert Comment

by:Jeff Darling
Comment Utility
like this?

example1
0
 
LVL 12

Accepted Solution

by:
Jeff Darling earned 40 total points
Comment Utility
@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
Comment Utility
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
Comment Utility
You can even simplify the formula to

=A1=B1
0
 

Author Closing Comment

by:Wass_QA
Comment Utility
That was it,
the automatic calculations was disabled
thanks for all.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
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…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now