Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
PA PA is offline
external usenet poster
 
Posts: 101
Default Delete Duplicates

I have created a formula in column Q which, after filled to the last row of
data identifies all of the duplicates by putting the SSN found in column K,
into the corresponding cell in column Q.
The formula is
=IF(AND(COUNTIF($P$2:$P$1740,P2)1,COUNTIF($G$2:$G $1740,G2)1),K2,"")

I need to write some code to delete all duplicates, except one.
Any suggestions are eagerly appreciated.
Paul
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Delete Duplicates


Do you want to delete all duplicates except the original and would you
want the entire row deleting?


--
The Code Cage Team

Regards,
The Code Cage Team
www.thecodecage.com
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=24057

  #3   Report Post  
Posted to microsoft.public.excel.programming
PA PA is offline
external usenet poster
 
Posts: 101
Default Delete Duplicates

Thanks for coming back to me,
If I have 2500 records, and 1000 of them should be unique, there are 1500
duplicates in addition to the 1000 that should be unique. I need to find all
identical records, some will have 1 duplicate, some 2 or more, and some may
have none.
When the process is completed, only the 1000 unique records will remain with
no duplicates.
The data is coming from a Mainframe download.
Hopefully, I have explained better
Thank you

"The Code Cage Team" wrote:


Do you want to delete all duplicates except the original and would you
want the entire row deleting?


--
The Code Cage Team

Regards,
The Code Cage Team
www.thecodecage.com
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=24057


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Delete Duplicates


you did explain well only you didnt say if the entire row with the
duplicates should be deleted?


--
The Code Cage Team

Regards,
The Code Cage Team
www.thecodecage.com
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=24057

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Delete Duplicates

You can use advanced filter with copy to another location option to filter
out unique records. Read more about it on this URL
http://www.contextures.com/xladvfilter01.html#FilterUR. Contextures has very
good information on other excel topics also.
--
Regards,



"PA" wrote:

Thanks for coming back to me,
If I have 2500 records, and 1000 of them should be unique, there are 1500
duplicates in addition to the 1000 that should be unique. I need to find all
identical records, some will have 1 duplicate, some 2 or more, and some may
have none.
When the process is completed, only the 1000 unique records will remain with
no duplicates.
The data is coming from a Mainframe download.
Hopefully, I have explained better
Thank you

"The Code Cage Team" wrote:


Do you want to delete all duplicates except the original and would you
want the entire row deleting?


--
The Code Cage Team

Regards,
The Code Cage Team
www.thecodecage.com
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=24057




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Delete Duplicates

See...
http://support.microsoft.com/KB/555375
--
Jim Cone
Portland, Oregon USA

  #7   Report Post  
Posted to microsoft.public.excel.programming
PA PA is offline
external usenet poster
 
Posts: 101
Default Delete Duplicates

Yes, the entire row should be deleted, leaving behind only unique rows.
Being used to doing things with formulas, and manually, I guess I make a lot
of assumptions that I do intuitively when working with the file.
If originally there are 3000 rows, and 2000 rows are unique and there are
also 500 rows each with a duplicate, when done there will be 2500 rows. This
is an example and please keep in mind that there may be some records with
more than one duplicate.
We get a new text file from the Data Center each week and never know how
many records are contained.

I hope this clarifies the situation.



"The Code Cage Team" wrote:


you did explain well only you didnt say if the entire row with the
duplicates should be deleted?


--
The Code Cage Team

Regards,
The Code Cage Team
www.thecodecage.com
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=24057


  #8   Report Post  
Posted to microsoft.public.excel.programming
PA PA is offline
external usenet poster
 
Posts: 101
Default Delete Duplicates

Thank you all for the feedback.
I fiddled around with Access over the weekend and came up with an excellent
method for identifying and deleting duplicates.
And I am particularly grateful to Jim Cone for teaching me how to ask a
question.

"PA" wrote:

I have created a formula in column Q which, after filled to the last row of
data identifies all of the duplicates by putting the SSN found in column K,
into the corresponding cell in column Q.
The formula is
=IF(AND(COUNTIF($P$2:$P$1740,P2)1,COUNTIF($G$2:$G $1740,G2)1),K2,"")

I need to write some code to delete all duplicates, except one.
Any suggestions are eagerly appreciated.
Paul

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
Delete duplicates Angie M. Excel Worksheet Functions 4 February 4th 10 03:56 AM
Delete duplicates? kk Excel Discussion (Misc queries) 2 March 14th 08 02:22 PM
Delete Duplicates Lauren New Users to Excel 4 April 11th 06 05:46 AM
delete duplicates macro to color instead of delete DKY[_90_] Excel Programming 4 December 22nd 05 05:44 PM
Delete duplicates Carter68 Excel Worksheet Functions 3 June 15th 05 12:01 AM


All times are GMT +1. The time now is 05:34 PM.

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"