Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Is it possible to 'auto-delete' rows of data held in one Excel 2010 file from another Excel file

Posted on 2011-10-21
1
Medium Priority
?
230 Views
Last Modified: 2012-05-12
Hi
I have a master Excel 2010 file of about 10,000 contact names and addresses (each contact on a row) and another Excel 2010 file of about 500 contact names which I need to delete from the master file. The rows in each file contain the same information (Email & Name).
Is there a way that I can use a formula or something to delete the 500 rows from the master list without doing it manually one-by-one?
Some kind of formula which says look for this contact in this file and delete?
I'm not an expert on Excel but maybe someone can help or come up with a solution!
Thanks
Andy
0
Comment
Question by:awmorseuk
1 Comment
 
LVL 4

Accepted Solution

by:
AgeOfEmpires earned 2000 total points
ID: 37009397
Like many things in Excel, there are multiple ways to do this, especially if there is a column or set of columns that uniquely identifies each row.  (Maybe you have more than one "John Johnson", but most likely, they aren't at the same address.)  Also, the approach depends on an exact entry for a duplicate item in each list.  (For example, if name and address will uniquely identify a row, then you can't have "123 Main Street" in one list and that be entered as "123 Main St." in the other)

If you've got one unique column, then you don't have to build a temporary key, otherwise, construct a key with something like =CONCATENATE(trim(A1),"*",trim(b1)).  This formula assumes that you need two columns (A and B) to build a unique key.  You can use different columns, of course, vs. A and B, and you can add more than two columns, if needed.

Once you have a unique identified for each row, you can use the column with the key (or constructed key if it takes more than one column as shown in the prior paragraph) and search the master list for entries that are listed in the list of 500.  How?  By using the MATCH function.  On your master list, in an adjacent, blank column to the right of your master data, you would enter something like: =IF(ISERROR(MATCH(Cell_With_Unique_Row_Key,Range_Of_Unique_Keys_In_500_List,0)),"","X").

The last step is simply to filter your master list on the column with the IF/ISERROR/MATCH formula for cells with an "X".  Once filtered, you can delete all those rows.

Hope this helps.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question