ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Removing duplicate entries (https://www.excelbanter.com/excel-discussion-misc-queries/103210-removing-duplicate-entries.html)

katiek648

Removing duplicate entries
 
My company just purchased an email list that has numberous duplicate emails.
It looks something like this:

First Name Last Name Email
Thomas Gordon
William Hughes

Robert Doby

Carter Burdette

Claudia Coscia

Christine Holland

Joel Hayhurst

Krista Bates

William Hayward

D Wade Cloud

John Sonderegger


We would like to remove all duplicate emails except for the first occuring
one so that it would look like this:

First Name Last Name Email
Thomas Gordon

William Hughes
Robert Doby
Carter Burdette
Claudia Coscia
Christine Holland
Joel Hayhurst

Krista Bates
William Hayward
D Wade Cloud
John Sonderegger



Is there some way to set up a filter to do this automatically? Thanks for
your help in advance!!


Dave Peterson

Removing duplicate entries
 
How about keeping the values in the cell, but using format|conditional
formatting to make those duplicates look empty?

Debra Dalgleish shows how:
http://www.contextures.com/xlCondFor...html#Duplicate

And this will make it easier if you ever have to sort/filter the data.

katiek648 wrote:

My company just purchased an email list that has numberous duplicate emails.
It looks something like this:

First Name Last Name Email
Thomas Gordon
William Hughes

Robert Doby

Carter Burdette

Claudia Coscia

Christine Holland

Joel Hayhurst

Krista Bates

William Hayward

D Wade Cloud

John Sonderegger


We would like to remove all duplicate emails except for the first occuring
one so that it would look like this:

First Name Last Name Email
Thomas Gordon

William Hughes
Robert Doby
Carter Burdette
Claudia Coscia
Christine Holland
Joel Hayhurst

Krista Bates
William Hayward
D Wade Cloud
John Sonderegger


Is there some way to set up a filter to do this automatically? Thanks for
your help in advance!!


--

Dave Peterson

PCLIVE

Removing duplicate entries
 
Sub test()
' This function must sort first.
'This assumes the name and email address are in column A and B
Range("A1:" & (Range("B65536").End(xlUp).Address)).Select
Selection.Sort Key1:=Range("B1"), Order1:=xlAscending, _
Header:=xlNo, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
ColNum = Selection(2).Column
For RowNdx = Selection(Selection.Cells.Count).Row To _
Selection(2).Row + 1 Step -1
If Cells(RowNdx, ColNum).Value = Cells(RowNdx - 1, ColNum).Value
Then
Range("B" & RowNdx).ClearContents
'Cells (RowNdx, ColNum).Value = ""
End If
Next RowNdx


End Sub



"katiek648" wrote in message
...
My company just purchased an email list that has numberous duplicate
emails.
It looks something like this:

First Name Last Name Email
Thomas Gordon
William Hughes

Robert Doby

Carter Burdette

Claudia Coscia

Christine Holland

Joel Hayhurst

Krista Bates

William Hayward

D Wade Cloud

John Sonderegger


We would like to remove all duplicate emails except for the first occuring
one so that it would look like this:

First Name Last Name Email
Thomas Gordon

William Hughes
Robert Doby
Carter Burdette
Claudia Coscia
Christine Holland
Joel Hayhurst

Krista Bates
William Hayward
D Wade Cloud
John Sonderegger



Is there some way to set up a filter to do this automatically? Thanks for
your help in advance!!





All times are GMT +1. The time now is 12:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com