Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Faio
 
Posts: n/a
Default Comparing 2 columns if they are the same

I have two columns to compare. I first sort them out in the same order and
then use the IF function. The If function is OK but when the rows to compare
are not match due to the error in typing or spaces then there is no match.
Is there another way or function to use that instead of sorting, it will
just lookup the two columns and compare and then indicate that there are say
5 mismatched and indicate them?

Appreciate any help

JSSU0611220
JSSU0611220

JSSU0618924
JSSU0611339

JSSU0617893
JSSU0612227

JSSU0615170
JSSU 0614195

JSSU0614370
JSSU0614322

JSSU0614322
JSSU0614370

JSSU0614195
JSSU0615170

JSSU0612227
JSSU0617893

JSSU0611339
JSSU0618924




  #2   Report Post  
bpeltzer
 
Posts: n/a
Default Comparing 2 columns if they are the same

You could allow for the extra spaces in your compare function: instead of
a3=a2, use trim(a3)=trim(a2).

"Faio" wrote:

I have two columns to compare. I first sort them out in the same order and
then use the IF function. The If function is OK but when the rows to compare
are not match due to the error in typing or spaces then there is no match.
Is there another way or function to use that instead of sorting, it will
just lookup the two columns and compare and then indicate that there are say
5 mismatched and indicate them?

Appreciate any help

JSSU0611220
JSSU0611220

JSSU0618924
JSSU0611339

JSSU0617893
JSSU0612227

JSSU0615170
JSSU 0614195

JSSU0614370
JSSU0614322

JSSU0614322
JSSU0614370

JSSU0614195
JSSU0615170

JSSU0612227
JSSU0617893

JSSU0611339
JSSU0618924





  #3   Report Post  
Max
 
Posts: n/a
Default Comparing 2 columns if they are the same

One way

Assuming data is in cols A & B, from row2 down

Put in C2: =IF(A2="","",ISNUMBER(MATCH(A2,B:B,0)))
Copy down till last row of data in col A
(Above compares col A against col B)

Put in D2: =IF(B2="","",ISNUMBER(MATCH(B2,A:A,0)))
Copy down till last row of data in col B
(Above compares col B against col A)

Put 2 labels into C1:D1, and do an autofilter on cols C & D in turn

Filtering out: FALSE in each case (col C, then col D) would then
locate the mismatches for the comparison
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Faio" wrote in message
...
I have two columns to compare. I first sort them out in the same order and
then use the IF function. The If function is OK but when the rows to

compare
are not match due to the error in typing or spaces then there is no match.
Is there another way or function to use that instead of sorting, it will
just lookup the two columns and compare and then indicate that there are

say
5 mismatched and indicate them?

Appreciate any help

JSSU0611220
JSSU0611220

JSSU0618924
JSSU0611339

JSSU0617893
JSSU0612227

JSSU0615170
JSSU 0614195

JSSU0614370
JSSU0614322

JSSU0614322
JSSU0614370

JSSU0614195
JSSU0615170

JSSU0612227
JSSU0617893

JSSU0611339
JSSU0618924






  #4   Report Post  
Max
 
Posts: n/a
Default Comparing 2 columns if they are the same

And a nice closure note received from the OP ..

To: "Max"
Subject: Comparing 2 columns if they are the same
Date: Tue, 15 Nov 2005 14:30:45 +1200

Thanx a lot.
It works as expected.
Great

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--


  #5   Report Post  
AnisaF
 
Posts: n/a
Default Comparing 2 columns if they are the same

Check http://www.j-walk.com/ss/excel/usertips/tip027.htm

OR http://www.j-walk.com/ss/excel/usertips/tip048.htm

--
Rani


"Faio" wrote:

I have two columns to compare. I first sort them out in the same order and
then use the IF function. The If function is OK but when the rows to compare
are not match due to the error in typing or spaces then there is no match.
Is there another way or function to use that instead of sorting, it will
just lookup the two columns and compare and then indicate that there are say
5 mismatched and indicate them?

Appreciate any help

JSSU0611220
JSSU0611220

JSSU0618924
JSSU0611339

JSSU0617893
JSSU0612227

JSSU0615170
JSSU 0614195

JSSU0614370
JSSU0614322

JSSU0614322
JSSU0614370

JSSU0614195
JSSU0615170

JSSU0612227
JSSU0617893

JSSU0611339
JSSU0618924





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
comparing columns dfeld71 Excel Discussion (Misc queries) 2 July 14th 05 11:00 AM
Hiding columns and custom views problem Bettergains Excel Discussion (Misc queries) 2 April 12th 05 11:48 PM
Removing Near-Duplicate Rows, Leaving Those w/Most Data in Specific Columns foofoo Excel Discussion (Misc queries) 1 April 2nd 05 12:02 AM
Need help with lookup and comparing values Steve Excel Worksheet Functions 7 January 30th 05 02:38 PM
Counting the Contents of Two Columns Molochi Excel Discussion (Misc queries) 6 December 22nd 04 08:13 PM


All times are GMT +1. The time now is 02:49 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"