Solved

Compare 2 excel cells

Posted on 2012-12-28
11
257 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

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…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

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