Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Cell Column Comparison

I have six columns of part numbers (A-F) that I want to compare to each
other. The part numbers that are an exact match I want displayed in column G
and the number that do not match I want displayed in column H. What is the
best way to accomplish this with an Excel fomular?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Cell Column Comparison

One interp and formulas play (Try in a copy of your sheet) ..

Cut n paste sequentially (one below the other) the data that's in cols B to
F into col A, so that all data is in col A

Then place

In B1:
=IF(A1="","",IF(COUNTIF($A$1:A1,A1)1,"",ROW()))

In C1:
=IF(A1="","",IF(COUNTIF($A$1:A1,A1)1,ROW(),""))

In D1:
=IF(ROW()COUNT(B:B),"",INDEX($A:$A,SMALL(B:B,ROW( ))))

Copy D1 to E1. Select B1:E1, copy down to last row of data in col A. Col D
returns the list of unique part#s, col E returns the list of duplicate part#s
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"ace21" wrote:
I have six columns of part numbers (A-F) that I want to compare to each
other. The part numbers that are an exact match I want displayed in column G
and the number that do not match I want displayed in column H. What is the
best way to accomplish this with an Excel fomula?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Cell Column Comparison



"Max" wrote:

One interp and formulas play (Try in a copy of your sheet) ..

Cut n paste sequentially (one below the other) the data that's in cols B to
F into col A, so that all data is in col A

Then place

In B1:
=IF(A1="","",IF(COUNTIF($A$1:A1,A1)1,"",ROW()))

In C1:
=IF(A1="","",IF(COUNTIF($A$1:A1,A1)1,ROW(),""))

In D1:
=IF(ROW()COUNT(B:B),"",INDEX($A:$A,SMALL(B:B,ROW( ))))

Copy D1 to E1. Select B1:E1, copy down to last row of data in col A. Col D
returns the list of unique part#s, col E returns the list of duplicate part#s
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"ace21" wrote:
I have six columns of part numbers (A-F) that I want to compare to each
other. The part numbers that are an exact match I want displayed in column G
and the number that do not match I want displayed in column H. What is the
best way to accomplish this with an Excel fomula?




I tied the formula but I get some duplicate part numbers that are in both
the unique part number list and the duplicate part number list when they
should be in either one or the other list and not both. Example: Part number
00200-08015 will be in both list when it should only be in one. Is there a
way to fix this?
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Cell Column Comparison

"ace21" wrote:
I tried the formula but I get some duplicate part numbers that are in both
the unique part number list and the duplicate part number list when they
should be in either one or the other list and not both. Example: Part number
00200-08015 will be in both list when it should only be in one. Is there a
way to fix this?


Aha, so that's what you really want ..

No problem, just amend the formulas in cols B and C:
In B1: =IF(A1="","",IF(COUNTIF(A:A,A1)1,"",ROW()))
In C1: =IF(A1="","",IF(COUNTIF(A:A,A1)1,ROW(),""))
(Rest of steps earlier follows. No change to formulas in cols D and E)

The above will now return items which occur only once in col D, items
occuring more than once in col E.

"Uniques" are commonly understood to include the 1st instance/occurence. The
2nd instance onwards are called "duplicates". That's what the earlier set-up
delivers.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
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
How do I combine spreadsheets and documents in one file? Trish Excel Discussion (Misc queries) 3 November 9th 06 09:17 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
up to 7 functions? ALex Excel Worksheet Functions 10 April 12th 05 06:42 PM


All times are GMT +1. The time now is 10:42 AM.

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

About Us

"It's about Microsoft Excel"