Linking Two Tables with Make Table query

brendanolear

Active Member
Joined
Apr 26, 2008
Messages
366
I have two basic tables with data as such.

Table1
CompCode ProdCode Sales2012
AAA01 ZZZ06 100.00
AAA08 ZZZ05 150.00
AAA10 ZZZ08 200.00


Table2
CompCode ProdCode Sales2011
AAA01 ZZZ10 100.00
AAA09 ZZZ05 150.00
AAA10 ZZZ08 250.00

I am using a make table query to combine, however the "joins" I am using is to show all records where CompCode from Table1 matches CompCode from Table2 (AND) ProdCode from Table1 matches ProdCode from Table2.


Where there is a CompCode in Table2 that is not included in Table1 I still wish to capture this data, how would I go about this when the "Join Properties" are restricted to one-way link as such?

Trust this makes sense.
 
Last edited:

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
What about appending the records into another table so you then get a continous list if I understand your thread correctly.
 
Upvote 0
If comp codes don't match, what about the prod codes? You could end up with a weird query where all the prodcodes in one table match all the prod codes in the other table.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,947
Members
449,095
Latest member
nmaske

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