Exclusion Table with two matching Criteria

pocquet

Board Regular
Joined
Aug 21, 2013
Messages
118
Hi Guys,

I need to exclude a number of vendors from a list.

The easiest way for me to do this would be to use a table to exclude records.

Code:
Tbl_Vendor_List
Fields: Vendor number, Vendor name, Vendor Cat, Spend

Tbl_exclude
Fields: Vendor Number, vendor Cat, exclusion Reason

I have done this in the past by linking vendor numbers and using a join to exclude them. However I need to evaluate both vendor number and vendor cat (if either dont match then I dont want to exclude them).

Is this possible and how?

Thanks

Jon
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi, you can use OR in your join clauses.
ξ
 
Upvote 0
Looks like not supported in MSAccess Design View but definitely possible with raw SQL:

Code:
SELECT * 
FROM
	Table9 a
	INNER JOIN
	Table10 b
	ON
		a.VendorNum = b.VendorNum
		OR a.VendorCat = b.VendorNum;

Using old SQL-89 syntax can also be written this way (and is supported in Design View):
Code:
SELECT *
FROM 
    Table9 a, Table10 b
WHERE 
	a.VendorNum = b.VendorNum
	OR a.VendorCat = b.VendorNum;
 
Upvote 0

Forum statistics

Threads
1,221,813
Messages
6,162,126
Members
451,743
Latest member
matt3388

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