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.
 
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.


Thanks a lot!!
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

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