Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Finding difference between two columns

Hi all,

I have two columns of numbers which *should* match but don't. One
column stretches out longer than the other, and I'd like to create in a
third column that has all entries in Column A not in Column B. Can anyone
reccomend a way to do this? I've sorted both columns in ascending order, if
that helps.

Thanks,

-Jim


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Finding difference between two columns

"Jim Bancroft" wrote in message ...
Hi all,

I have two columns of numbers which *should* match but don't. One
column stretches out longer than the other, and I'd like to create in a
third column that has all entries in Column A not in Column B. Can anyone
reccomend a way to do this? I've sorted both columns in ascending order, if
that helps.

Thanks,

-Jim


OK,

I am a rookie but I just had to do this. There are always 10 ways to
do anything. With some help I ended up with some complicated VBA code
that I do not really understand.

Below is the quick and dirty way to do the job, maybe not the most
elegant. But it worked for me!!

I would open a new blank workbook and do this (you do not need to
worry about sorting and I am assuming no header row):

1) Copy the long column to Sheet1 Column B

2) Copy the short column to Sheet2 Column A (make a note of the last
row, you will not need to go back to Sheet2 after this)

3) Copy this formula into cell A1 on Sheet1

4) =COUNTIF(Sheet2!A$1:A$9,B1)

5) Adjust the range: A$1:A$9 to match the last row in Sheet2

6) Drag the formula in Sheet1 cell A1 to the last row in Sheet1 column
B

7) You should now have a series of 1's and 0's. The 0's are the
entries that are
in the long column (Sheet1) that are NOT in the short column (Sheet2).

8) Now turn on AutoFilter: Data, Filter, Autofilter

9) Filter Sheet1 column A to show only 0's. This is your new list you
can copy to a new column.

(You can do this without copying the columns to seperate sheets, but
it is less confusing this way. Also if you have other columns with
data you will want to copy all of them to the new workbook.)

Fred
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
Finding the difference Renegade Excel Discussion (Misc queries) 1 April 6th 09 09:13 PM
finding date difference Totti Excel Discussion (Misc queries) 4 October 15th 08 09:35 PM
Finding the difference Heather Excel Discussion (Misc queries) 4 August 1st 08 02:50 PM
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
Finding Time difference John Harris Excel Worksheet Functions 2 May 13th 05 11:32 PM


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