Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
kpk kpk is offline
external usenet poster
 
Posts: 1
Default Compare two columns and find the difference between the two column

I have two columns, 1 with 3800 entries and 2 with 1500 entries. I want to
find the entries which are in column 1 but not in column 2.
--
kpk
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Compare two columns and find the difference between the two column

Here's how you can compare two columns and find the difference between them:
  1. First, select a blank cell where you want to display the results of the comparison.
  2. In that cell, type the following formula:
    Code:
    =IFERROR(INDEX(Column1,MATCH(0,COUNTIF(Column2,Column1),0)),"")
  3. Replace "Column1" with the range of your first column (e.g. A1:A3800).
  4. Replace "Column2" with the range of your second column (e.g. B1:B1500).
  5. Press Ctrl + Shift + Enter to enter the formula as an array formula. This will ensure that the formula is applied to all cells in the selected range.
  6. The formula will return the first value in Column1 that is not in Column2. To find the rest of the values, simply drag the formula down to the rest of the cells in the column.

This formula uses the INDEX and MATCH functions to find the first value in Column1 that is not in Column2. The COUNTIF function is used to count the number of times each value in Column1 appears in Column2. The IFERROR function is used to display a blank cell if there are no more values to compare.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Compare two columns and find the difference between the two column

I'd use a formula like this in a helper column:

=isnumber(match(a1,sheet2!a:a,0))
and drag down.

True means that a1 appears in sheet2, column A.

If that's not enough...

Chip Pearson has lots of techniques to work with duplicates:
http://www.cpearson.com/excel/Duplicates.aspx

kpk wrote:

I have two columns, 1 with 3800 entries and 2 with 1500 entries. I want to
find the entries which are in column 1 but not in column 2.
--
kpk


--

Dave Peterson
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
compare and find similar numbers in two columns New User New Users to Excel 1 October 25th 06 06:59 PM
Compare data in two columns to find duplicates. Dan Excel Discussion (Misc queries) 2 October 5th 05 04:42 AM
charting a difference of 2 columns' w/o adding a difference column Wab Charts and Charting in Excel 4 July 27th 05 02:37 AM
using VLOOKUP to compare 2 columns to find new information Jessica Excel Worksheet Functions 3 July 19th 05 02:59 AM
How do I compare 2 worksheets, 1 old, 1 updated to find difference alienstew Excel Discussion (Misc queries) 1 January 31st 05 03:01 PM


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

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"