If combined with Vlookup in MS Access

excel_1317

Board Regular
Joined
Jun 28, 2010
Messages
212
I am new to Access, just wanted to ensure that is below is achievable in MS Access.

=IF(IFNA(VLOOKUP(C4,$A:$A,1,0),"")=C4,"Yes","No")


So, I have 2 tables in Access, i just want to create a query which lookup Account number from in Table 1 in Table 2 and return a Yes if the account number is present in Table 2 and No if Account Number is not present in table 2. Just like above excel function.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
You can use dlookup or an inner join with a calculated column

Inner join would only return common Account Numbers but I want all Account Numbers from Table 1 with a Yes or No populated against them.

How just Dlookup wil work? I already tried with no success.
 
Upvote 0
Can't help editing your formula:
=IF(ISNUMBER(MATCH(C4,$A:$A,0)),"Yes","No")
 
Upvote 0
Use a left join of table 1 on table 2.
 
Upvote 0
your formula only looks up a single value. Are you trying to test a single value for existence?
 
Upvote 0
You want to write a Query using Left Join.
Code:
Select 
	Table1.AccountNumber, 
	IIf(IsNull(Table2.AccountNumber), "No", "Yes") AS MyOtherColumn
From
	Table1
	Left Join Table2
	On Table1.AccountNumber = Table2.AccountNumber

Note that depending on what your ultimate aim is, you can also use the unmatched records wizard, although personally I prefer to write my own SQL.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,810
Messages
6,162,108
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