Exclude records found in Find Duplicates Query

VorLag

Board Regular
Joined
May 13, 2013
Messages
205
I used the wizard to build a Find Duplicates query and want to now build another query to list records that exclude those in that Find Duplicates query. How can I do this?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Create an Unmatched Query from your original data set to your Duplicate Query. There is a Wizard which you can use for this, assuming that you are joining these two by just one field (if more, first do it for just one field, then open the Query in Design mode and add your other Left Outer Joins).
 
Upvote 0
That works for getting rid of all of the records, but I realized that it gets rid of the first instance of each record for which there is a duplicate as well. Is there a way to keep the first instance of each record and exclude the second, third, etc?
 
Upvote 0
You should be able to use an Aggregate Query to get what you want.

Create a query and select all the records you want to return.
In Query Builder, click on the "Totals" button (looks like a Sigma). This will add a Totals row under each field with the option "Group By" selected for each one.
View the results.

This will collapse all duplicates and only show each record once.
 
Upvote 0
You're welcome.
Aggregate Queries are a good tool that I use often. They are also great for grouping records and finding counts, sums, etc.
 
Upvote 0

Forum statistics

Threads
1,215,463
Messages
6,124,965
Members
449,201
Latest member
Jamil ahmed

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