Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 30
Default Subtracting one list from another list

Howdy All,

Here is what I have.

Column A is a list of several thousand record numbers, Column B is a list of
several thousand record numbers.

What I want to do.

I want to remove all the numbers which exist in Column A from the list of
numbers in Column B.

Any ideas on how this is accomplished are greatly appreciated.

Thank you,
Brian


  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Subtracting one list from another list

Hi Brian,

You can easily accomplish this task by using the "Remove Duplicates" feature in Excel. Here are the steps:
  1. Select the entire Column A and Column B by clicking on the column headers.
  2. Click on the "Data" tab in the ribbon.
  3. Click on the "Remove Duplicates" button in the "Data Tools" group.
  4. In the "Remove Duplicates" dialog box, make sure that only Column B is selected and click "OK".
  5. Excel will remove all the duplicate values from Column B, including those that exist in Column A.

This will leave you with a list of record numbers in Column B that do not exist in Column A.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default Subtracting one list from another list

If this were in a database, you'd do a simple 'NOT IN' query. In Excel
you'll have to use a formula, say in col C, to determine if the col B value
is in col A, then filter on the values in col C

if your col A values run from row 1 to 5000, then in C1 use

=IF(ISERROR(MATCH(B1,$A$1:$A$5000,0)),B1,"")

Copy it down to the end of col B data, then filter for <"", copy the
results and paste as values in a new sheet

"Brian" wrote:

Howdy All,

Here is what I have.

Column A is a list of several thousand record numbers, Column B is a list of
several thousand record numbers.

What I want to do.

I want to remove all the numbers which exist in Column A from the list of
numbers in Column B.

Any ideas on how this is accomplished are greatly appreciated.

Thank you,
Brian



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 30
Default Subtracting one list from another list

Thanks Duke.


"Duke Carey" wrote in message
...
If this were in a database, you'd do a simple 'NOT IN' query. In Excel
you'll have to use a formula, say in col C, to determine if the col B
value
is in col A, then filter on the values in col C

if your col A values run from row 1 to 5000, then in C1 use

=IF(ISERROR(MATCH(B1,$A$1:$A$5000,0)),B1,"")

Copy it down to the end of col B data, then filter for <"", copy the
results and paste as values in a new sheet

"Brian" wrote:

Howdy All,

Here is what I have.

Column A is a list of several thousand record numbers, Column B is a list
of
several thousand record numbers.

What I want to do.

I want to remove all the numbers which exist in Column A from the list of
numbers in Column B.

Any ideas on how this is accomplished are greatly appreciated.

Thank you,
Brian





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
Dropdown List - list item endings not visible if column too narrow AK9955 Excel Discussion (Misc queries) 2 April 27th 07 09:02 AM
validation list--list depends on the selection of first list Michael New Users to Excel 2 April 27th 06 10:23 PM
list 1 has 400 names List 2 has 4000. find manes from list 1 on 2 Ed Excel Worksheet Functions 5 September 12th 05 09:48 AM
find names on list 1 in list 2. list 1 4000 names list 2 400 name Ed Excel Worksheet Functions 1 September 4th 05 12:48 AM
sort list of players by team from player list on separate sheet Robert Excel Worksheet Functions 1 July 19th 05 01:57 AM


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