Finding non duplicates, keeping one with amount

PondWaters

New Member
Joined
Jun 26, 2012
Messages
36
Office Version
  1. 365
Completely new to Access, so please bear with me.

I have 2 different files each of around 120k lines (240k total lines). These files are sent twice a month, and of the 240k total lines, around 225k are duplicates. Is there a way for me to erase one set of the duplicate data, and then the rest keep only the latest line of data?

The bear is that only one piece of data is different. So for example, here is what it comes in as:


Sheet1

*ABCDEFGHI
1Field1Field2Field3Field4Field5Field6Field7Field8Field9
2D123456789123456789-1SmithBob2015050120150531$12.00 A
3D987654321963258741-1SmithCarol2015050120150531$14.00 A
4D147258369878965412-1JonesFred20150501201505310B
5D3692581478795412-2JonesErica2015050120150531$8.00 C
6D3216549873251148-1JamesTom2015050120150531$25.00 C
7D35714715932584415-6JamesRobert2015050120150531$19.50 B
8D123456789123456789-1SmithBob2015050120150531$12.00 A
9D987654321963258741-1SmithCarol2015050120150531$14.00 A
10D147258369878965412-1JonesFred2015050120150531$33.00 B
11D3692581478795412-2JonesErica2015050120150531$8.00 C
12D3216549873251148-1JamesTom2015050120150531$25.00 C
13D35714715932584415-6JamesRobert2015050120150531$19.50 B

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:70px;"><col style="width:82px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4


I would want to see something like this, where the duplicates are removed, and if something came in twice and did not match, only the last piece of data would show.

Sheet1

*ABCDEFGHI
34Field1Field2Field3Field4Field5Field6Field7Field8Field9
35D123456789123456789-1SmithBob2015050120150531$12.00 A
36D987654321963258741-1SmithCarol2015050120150531$14.00 A
37D147258369878965412-1JonesFred2015050120150531$33.00 B
38D3692581478795412-2JonesErica2015050120150531$8.00 C
39D3216549873251148-1JamesTom2015050120150531$25.00 C
40D35714715932584415-6JamesRobert2015050120150531$19.50 B

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:70px;"><col style="width:82px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4



Any help would be appreciated, I am trying to learn Access, but I am running into a wall on this one.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
You would probably use an Aggregate (Totals) Query to do that. If you are not familiar with those, try a Google Search. There are lots of tutorials out there.

if something came in twice and did not match, only the last piece of data would show.
You just need to determine how "last" is identified. Remember, the order of the records in the table really has no meaning. Someone once gave an accurate description to think of an Access table as a "bag or marbles"; the records are all jumbled around and have no meaning.

Now, if you use an Autonumber field in your table that increments, then you could easily identify the "last" record by taking the "Max" of value of this Autonumber field for each Grouping.
 
Upvote 0
Thank you, I'll take a look at the aggregate query. Saying last is not necessarily the best way to describe it, if something comes across as 0 on the first file, on the second file it is most likely going to be >0. If it is 0, that would just be a duplicate anyway.
 
Upvote 0
Sounds like then in your Aggregate Query, you want to Group By Fields 1-7 and Field 9, and then take the Max of Field 8.
I think that will return what you are looking for.
 
Upvote 0

Forum statistics

Threads
1,221,849
Messages
6,162,425
Members
451,765
Latest member
craigvan888

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