Duplicate Records

monbri

Board Regular
Joined
Sep 11, 2003
Messages
52
This might be an odd problem. I have a table with 19049 records. 8904 are duplicates. I want to delete the duplicates and the origianals and just leave the records that are not duplicates leaving me with 1241 records.

Any ideas?
Thanks in advance.

Brian
Fort Lauderdale, FL
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
In a query, if you group the records based on all fields, it will group all like records, thus eliminating the duplicates (from the query only).

You can then use this query as your data source, or create a Make Table Query to write these records back to a new table, if needed.
 
Upvote 0
Create a new query. Select the table with the duplicates. Then add every field in your table to the query separately (do not use the asterisk option). Then click on the "Totals" icon button (it looks like a Summation sign, or fancy looking "E"). Then view your data. This will group all duplicate records into one record.
 
Upvote 0
As Monbri wants to exclude the original as well as the duplicate he will need to set some sort of count field as well to use as a filter

Peter
 
Upvote 0
All you have to do is use this SQL but changing the MyTable and MyField variables to match your table/field.

SELECT First(MyTable.MyField) AS [Field], Count(MyTable.MyField) AS NumberOfDups
FROM MyTable
GROUP BY MyTable.MyField
HAVING (((Count(MyTable.MyField.))>=1));

to get all the records broken into groups.

Change the query to a MakeTable Query and you'd done it.
 
Upvote 0

Forum statistics

Threads
1,221,707
Messages
6,161,411
Members
451,704
Latest member
rvan07

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top