Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default looking to delete "non-matched" data

I have two lists done in excel.

An older one, List-A, with separate columns for name, street, city, email
addresses, company name, etc. and a newer one, List-B, that has just one
column of current email addresses that will match some of those in List-A.

I know I can copy the data from List-B into List-A and I'll end up with
duplicate emails of those I want to keep.

How can I delete the ones from List-A that have no match from List-B?

I looking for the opposite of getting rid of the duplicates - :)
Best wishes - DG
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 897
Default looking to delete "non-matched" data

Here's an example that might work for you.

List-A has address/city/state/zip in cell A1:

100 Main Street, Lenexa KS 67215

List-B has address/city/state/zip in separate cells (A6:D6)


This formula will check the full-address cell for the street address
and let you know if it's a duplicate. Adjust cell references as
appropriate.

=IF(NOT(ISBLANK(A6)),IF(SUM(LEN(A1:A2)-
LEN(SUBSTITUTE(LOWER(A1:A2),LOWER(A6),"")))=LEN(A6 ),"Duplicate",""),"")

This is one formula and should be entered as an array (Ctrl-Shift-
Enter).

I put a sample workbook here if you want to check it out:
http://www.codeforexcelandoutlook.com/FindDupes.xls


HTH,
JP


On Apr 7, 6:46*pm, RunOrDie
wrote:
I have two lists done in excel.

An older one, List-A, with separate columns for name, street, city, email
addresses, company name, etc. and a newer one, List-B, that has just one
column of current email addresses that will match some of those in List-A.

I know I can copy the data from List-B into List-A and I'll end up with
duplicate emails of those I want to keep.

How can I delete the ones from List-A that have no match from List-B?

I looking for the opposite of getting rid of the duplicates - :)
Best wishes - DG


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default looking to delete "non-matched" data

I think I understand - but I'm looking to keep only the duplicates.


List-A has address in just one cell A1:

100 Main Street

List-B has address/city/state/zip and other data in separate cells (A6:D9)


I want to be able to keep only those in List B that match List A
Thanks -dg
--
Best wishes - DG


"JP" wrote:

Here's an example that might work for you.

List-A has address/city/state/zip in cell A1:

100 Main Street, Lenexa KS 67215

List-B has address/city/state/zip in separate cells (A6:D6)


This formula will check the full-address cell for the street address
and let you know if it's a duplicate. Adjust cell references as
appropriate.

=IF(NOT(ISBLANK(A6)),IF(SUM(LEN(A1:A2)-
LEN(SUBSTITUTE(LOWER(A1:A2),LOWER(A6),"")))=LEN(A6 ),"Duplicate",""),"")

This is one formula and should be entered as an array (Ctrl-Shift-
Enter).

I put a sample workbook here if you want to check it out:
http://www.codeforexcelandoutlook.com/FindDupes.xls


HTH,
JP


On Apr 7, 6:46 pm, RunOrDie
wrote:
I have two lists done in excel.

An older one, List-A, with separate columns for name, street, city, email
addresses, company name, etc. and a newer one, List-B, that has just one
column of current email addresses that will match some of those in List-A.

I know I can copy the data from List-B into List-A and I'll end up with
duplicate emails of those I want to keep.

How can I delete the ones from List-A that have no match from List-B?

I looking for the opposite of getting rid of the duplicates - :)
Best wishes - DG



  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default looking to delete "non-matched" data

Try this on a spare copy of your file

Assume your sheet: List-B contains the emails in A2 down

In sheet: List-A,
Assume your source data is in cols A to F, from row2 down,
with the key "Email" col in col D

Put this in say, K2:
=IF(D2="","",IF(ISNUMBER(MATCH(D2,'List-B'!A:A,0)),"In List-B","Not in
List-B"))
Copy K2 down to the last row of data in col D. Col K will provide the flags
for you to easily autofilter according to what you want to do. The flags will
be:

In List-B : where the email in col D is found in List-B's col A
Not in List-B : where the email in col D is not found in List-B's col A
Blank: "", where col D is blank

Then you could apply autofilter on col K
and choose this from the dropdown in K1: Not in List-B
if you want to do this:
How can I delete the ones from List-A that have no match from List-B?

Then just select the filtered rows, right-click Delete Row, then remove
autofilter, and you should be left with the required results
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 897
Default looking to delete "non-matched" data

The formulas that come out blank are for the records you can delete.


HTH,
JP


On Apr 7, 7:58*pm, RunOrDie
wrote:
I think I understand - but I'm looking to keep only the duplicates.



List-A has address in just one cell A1:


100 Main Street


List-B has address/city/state/zip and other data in separate cells (A6:D9)


I want to be able to keep only those in List B that match List A
Thanks -dg
--
Best wishes - DG



"JP" wrote:
Here's an example that might work for you.


List-A has address/city/state/zip in cell A1:


100 Main Street, Lenexa KS 67215


List-B has address/city/state/zip in separate cells (A6:D6)


This formula will check the full-address cell for the street address
and let you know if it's a duplicate. Adjust cell references as
appropriate.


=IF(NOT(ISBLANK(A6)),IF(SUM(LEN(A1:A2)-
LEN(SUBSTITUTE(LOWER(A1:A2),LOWER(A6),"")))=LEN(A6 ),"Duplicate",""),"")


This is one formula and should be entered as an array (Ctrl-Shift-
Enter).


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
Excel "Move or Copy" and "Delete" sheet functions dsiama Excel Worksheet Functions 1 December 28th 07 01:57 PM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Similar Problem as "Multiple Matched Lines" jello523 Excel Discussion (Misc queries) 0 November 21st 06 09:40 PM
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" Dennis Excel Discussion (Misc queries) 0 July 17th 06 02:38 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


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