Word 2007
Hello Gurus:
I have two listings of e-mail addresses. List A has approximately 33,000
entries and List B has approximately 2,000 entries.
If possible, I would like to select each individual email entry in List A
and compare it to the entries in List B in search of a duplicate entry. If
the e-mail entry from List A is found in list B, I would like to delete the
email entry from List B.
If the e-mail entry is NOT found in List B, I would like to proceed to the
subsequent e-mail entry in List A and begin the process all over again.
Any assistance in this regard would be very much appreciated.
Thanking you in advance, I remain…
Very truly yours – Rod
|
|
0
|
|
|
|
Reply
|
Utf
|
2/3/2010 3:37:02 PM |
|
Hi Rod,
This is quite easy to do in Excel, without the need for a macro -simply put both lists into a single column (eg Column A) and insert
the following formula into column B:
=COUNTIF(A$1:A1,A1)
and copy down as far as needed. Then copy & paste column B as values and sort the data by column B. All the duplicates will then be
grouped together and the data will be otherwise in the same order as you originally had it.
--
Cheers
macropod
[Microsoft MVP - Word]
"Rod" <Rod@discussions.microsoft.com> wrote in message news:A2B43580-F6F4-4711-A271-B868DA5E7254@microsoft.com...
> Word 2007
>
> Hello Gurus:
>
> I have two listings of e-mail addresses. List A has approximately 33,000
> entries and List B has approximately 2,000 entries.
>
> If possible, I would like to select each individual email entry in List A
> and compare it to the entries in List B in search of a duplicate entry. If
> the e-mail entry from List A is found in list B, I would like to delete the
> email entry from List B.
>
> If the e-mail entry is NOT found in List B, I would like to proceed to the
> subsequent e-mail entry in List A and begin the process all over again.
>
> Any assistance in this regard would be very much appreciated.
>
> Thanking you in advance, I remain…
>
> Very truly yours – Rod
>
>
|
|
0
|
|
|
|
Reply
|
macropod
|
2/3/2010 10:21:26 PM
|
|
Assuming that the lists in question are simple lists with one entry per
paragraph in each document, then the following macro will remove from the
short list any item that appears in the long list. Run it on *copies* of the
document lists. Change the document paths as required.
Dim LongList As Document
Dim ShortList As Document
Set LongList = Documents.Open("D:\My Documents\Test\Temp\List1.docx")
Set ShortList = Documents.Open("D:\My Documents\Test\Temp\List2.docx")
For i = ShortList.Paragraphs.Count To 1 Step -1
With LongList.Range.Find
.Text = ShortList.Paragraphs(i).Range.Text
Do While .Execute(Forward:=True) = True
ShortList.Paragraphs(i).Range.Delete
Loop
End With
Next i
It could take a while to run :)
http://www.gmayor.com/installing_macro.htm
"Rod" <Rod@discussions.microsoft.com> wrote in message
news:A2B43580-F6F4-4711-A271-B868DA5E7254@microsoft.com...
> Word 2007
>
> Hello Gurus:
>
> I have two listings of e-mail addresses. List A has approximately 33,000
> entries and List B has approximately 2,000 entries.
>
> If possible, I would like to select each individual email entry in List A
> and compare it to the entries in List B in search of a duplicate entry.
> If
> the e-mail entry from List A is found in list B, I would like to delete
> the
> email entry from List B.
>
> If the e-mail entry is NOT found in List B, I would like to proceed to the
> subsequent e-mail entry in List A and begin the process all over again.
>
> Any assistance in this regard would be very much appreciated.
>
> Thanking you in advance, I remain.
>
> Very truly yours - Rod
>
>
|
|
0
|
|
|
|
Reply
|
Graham
|
2/4/2010 7:13:05 AM
|
|
|
2 Replies
835 Views
(page loaded in 0.047 seconds)
Similiar Articles: Macro for Finding Duplicate Data Entries - microsoft.public.word ...Word 2007 Hello Gurus: I have two listings of e-mail addresses. List A has approximately 33,000 entries and List B has approximately 2,000 ... Finding Duplicate Entries - microsoft.public.excel.worksheet ...Find duplicate, save in a list, delete duplicate using macro ... Macro for Finding Duplicate Data Entries - microsoft.public.word ... Find duplicate, save in a list ... Macro Help/Duplicate Items + Insert Rows + Sum - microsoft.public ...Macro for Finding Duplicate Data Entries - microsoft.public.word ... Macro Help/Duplicate Items + Insert Rows + Sum - microsoft.public ... Find Duplicate Entries ... Find duplicate, save in a list, delete duplicate using macro ...Macro for Finding Duplicate Data Entries - microsoft.public.word ... Find duplicate, save in a list, delete duplicate using macro ... 'copy the non ... from Excel Macro ... search column for duplicate value during data entry - microsoft ...Macro for Finding Duplicate Data Entries - microsoft.public.word ... Find duplicate, save in a list, delete duplicate using macro ... Generate GUID, Find ... search column ... checking duplicate values on data entry - microsoft.public.access ...Macro for Finding Duplicate Data Entries - microsoft.public.word ... Check Duplicate with VBA - microsoft ... save in a list, delete duplicate using macro ... Prevent duplicate entries in a column. - microsoft.public.mac ...Macro for Finding Duplicate Data Entries - microsoft.public.word ... Find Duplicate Entries (AlphaNumeric) In A Column 2. Insert 2 Rows Between The Dupl... ... Compare 2 columns and delete duplicate text - microsoft.public ...Macro for Finding Duplicate Data Entries - microsoft.public.word ... Find Duplicate Entries (AlphaNumeric) In A Column 2. ... Compare entries in 2 worksheets ... Finding duplicates in two separate Word documents? - microsoft ...Macro for Finding Duplicate Data Entries - microsoft.public.word ... Finding duplicates in two separate Word documents? - microsoft ... Dim LongList As Document Dim ... Highlight rows if duplicates are found - microsoft.public.excel ...Macro for Finding Duplicate Data Entries - microsoft.public.word ... If the e-mail entry from List A is found in list B, I would like to delete the ... Answer : Macro for Finding Duplicate Data EntriesMacro for Finding Duplicate Data Entries - answer - Word 2007 Hello Gurus: I have two listings of e-mail addresses. List A has approximately 33,000 entries and List B ... Macro for Finding Duplicate Data Entries - microsoft.public.word ...Word 2007 Hello Gurus: I have two listings of e-mail addresses. List A has approximately 33,000 entries and List B has approximately 2,000 ... Macro for Finding Duplicate Data Entries - Microsoft Office Word ...Microsoft Word Help ... Word 2007 Hello Gurus: I have two listings of e-mail addresses. List A has ... Hi Rod, This is quite easy to do in Excel, without the need for ... How to Remove Duplicates from Excel Macro | eHow.comYou may want to remove these duplicate entries to tighten up your data, but you ... Other macro codes find duplicates or remove duplicate rows. See Resources below for ... How to find duplicate entries in a column by using a macro in ...Provides Visual Basic for Application (VBA) sample code to demonstrate how to use macros to find duplicate cell entries in a column in Excel 2000. 7/25/2012 9:45:34 AM
|