unmatched query

juster21

Well-known Member
Joined
Jun 3, 2005
Messages
867
I have 2 tables. I need to find records that do NOT match based on 2 fields.
Both tables have fields ID# and Loc#...I need to see the records on table 1 that do not have a match on those 2 fields on table 2.

The wizard stops short of my needs so I thought I'd ask the experts. Thanks!!
 
Last edited:

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Juster,

You can use the Wizard to get you started. Work through the Unmatched Query Wizard. Obviously, it only lets you pick one field to match on, so pick one of your two. When complete, go into Design View of the Query. You should see the join between the two tables (a line with an arrow on the end).

For the other field you want to join, click on the fiels name in one table, and hold and drag to the field name in the other table. This will create another line (without the arrow though). Next double click on this line. You should see a box with three options. Toggle one of the other two so you get the arrow pointed in the right direction (should be obvious which one from the description). Then view your results.
 
Upvote 0
I have 2 tables. I need to find records that do NOT match based on 2 fields.
Both tables have fields ID# and Loc#...I need to see the records on table 1 that do not have a match on those 2 fields on table 2.

The wizard stops short of my needs so I thought I'd ask the experts. Thanks!!

I agree with Joe4, work through it. But if you're in a hurry

SELECT Tabl1.*
FROM Tabl2 RIGHT JOIN Tabl1
ON (Tabl2.IDNumber = Tabl1.IDNumber)
AND (Tabl2.LocNo = Tabl1.LocNo)
WHERE (((Tabl2.IDNumber) Is Null) AND ((Tabl2.LocNo) Is Null));
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

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