Multiple Criteria Query - Non Duplicates in same project

Silverbird09

New Member
Joined
Mar 2, 2017
Messages
2
Good Afternoon,

First of all I want to say I am a long time reader, first time poster on MrExcel. Because of this board, as well as others, I have become quite skilled in matters of Excel and Access (or at least been good at finding what I need at the time). However I have been unable to find the answer to my current question, perhaps I'm addressing it incorrectly.

Ok, enough of that, here is my scenario:

I have two tables with corresponding table structures. The only difference is one includes a Primary Key (MainTable), the other doesn't (ImportTable). The primary key is auto-generated during appending to MainTable. The intent is to use ImportTable to append new records into MainTable. The important columns include:

MainTable
Legacy_ID (Primary Key) -- Project_ID -- SKU_ID

ImportTable
Project_ID -- SKU_ID

The idea is to first check for duplicate SKU_ID's between the two tables before appending. However, there can be duplicates if the Project_ID's are different. I want to avoid duplicate results as shown in the example below:

MainTable (Duplicates Exist)
Legacy_ID (Primary Key)Project_IDSKU_ID
10011IMP-0002
10021IMP-0002
10032IMP-1013
10042IMP-3922

<tbody>
</tbody>

MainTable (No Duplicates Exist)
Legacy_ID (Primary Key)Project_IDSKU_ID
10011IMP-1245
10021IMP-0002
10032IMP-1013
10042IMP-0002


<tbody>
</tbody>

Hopeful I was able to explain that accurately. Thank you in advance for your thoughts and advice.

P.S. - I tried to find a similar question, but was unable to find a solution. I apologize in advance if I inadvertently duplicated this specific question.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,215,359
Messages
6,124,488
Members
449,166
Latest member
hokjock

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