Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CM CM is offline
external usenet poster
 
Posts: 136
Default formula not working

I am trying to compare two columns of data to find identical data, i'm using
the formula below and when it is supposed to be same it says different, in
some areas the formula works right in others it doesn't. any ideas on what
the problem is

IF(A1=B1,"SAME","DIFFERENT")

thanks for the help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default formula not working

Depends what the data is. Could it be a real number compared to a text
number ? Or maybe trailing spaces. Depends how you get the data.

Regards

Trevor


"CM" wrote in message
...
I am trying to compare two columns of data to find identical data, i'm
using
the formula below and when it is supposed to be same it says different, in
some areas the formula works right in others it doesn't. any ideas on what
the problem is

IF(A1=B1,"SAME","DIFFERENT")

thanks for the help



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default formula not working

See if this works:

=IF(LOWER(TRIM(A2)) = LOWER(TRIM(B2)), "Same", "Different")


"CM" wrote:

I am trying to compare two columns of data to find identical data, i'm using
the formula below and when it is supposed to be same it says different, in
some areas the formula works right in others it doesn't. any ideas on what
the problem is

IF(A1=B1,"SAME","DIFFERENT")

thanks for the help

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default formula not working

On Tue, 6 Nov 2007 14:41:02 -0800, CM wrote:

I am trying to compare two columns of data to find identical data, i'm using
the formula below and when it is supposed to be same it says different, in
some areas the formula works right in others it doesn't. any ideas on what
the problem is

IF(A1=B1,"SAME","DIFFERENT")

thanks for the help


In the instances where the formula returns "DIFFERENT", A1 is not the same as
B1.

Without access to your data, it is impossible to say further. Possibilities
include text vs number; non-printing characters; trailing spaces; etc.
--ron
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default formula not working

That formula disregards case and leading or trailing spaces. So be careful
how you use it. You might want to know if there are spaces in a cell since
they have a value in computer speak. If you want to capture those
differences, then eliminate the TRIM portion of the formula.

"CM" wrote:

I am trying to compare two columns of data to find identical data, i'm using
the formula below and when it is supposed to be same it says different, in
some areas the formula works right in others it doesn't. any ideas on what
the problem is

IF(A1=B1,"SAME","DIFFERENT")

thanks for the help



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default formula not working

One more thing. Be sure you have your range formatted the same for text and
numbers.

"CM" wrote:

I am trying to compare two columns of data to find identical data, i'm using
the formula below and when it is supposed to be same it says different, in
some areas the formula works right in others it doesn't. any ideas on what
the problem is

IF(A1=B1,"SAME","DIFFERENT")

thanks for the help

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF formula not working MelissaS Excel Worksheet Functions 6 March 31st 10 09:30 PM
A formula not working as the result of a previous formula? Ed[_7_] Excel Discussion (Misc queries) 5 July 21st 09 06:22 PM
IF OR formula not working cjpal Excel Discussion (Misc queries) 4 October 23rd 06 07:51 PM
Formula not working Cinderella Excel Discussion (Misc queries) 1 August 26th 06 11:47 PM
Formula not working for me now S S Excel Worksheet Functions 2 July 16th 06 09:10 AM


All times are GMT +1. The time now is 10:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"