Lookup against 2 tabs and return 'y/n' if value >0

gvillepa

New Member
Joined
Oct 18, 2017
Messages
36
I believe If/Index/Match, but struggling since i dont do this regularly. 2 tabs of data and looking to return a 'yes' or 'no' value comparing tab 1 vs tab 2 if a value is in tab 2 > 0 that matches the name in tab 1, return y/n or just the value from tab2.

Thanks in advance for your help with formula.
 

Attachments

  • Tab1.png
    Tab1.png
    21.7 KB · Views: 8
  • Tab2.png
    Tab2.png
    20.6 KB · Views: 9

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
=index(tab2!$B$2:$B$100,match(A2,tab2!$A$2:$A$100,0))
will lookup up the name from tab1 - against the list in tab2 - then return the value from B
now we need to see that value is >0
=index(tab2!$B$2:$B$100,match(A2,tab2!$A$2:$A$100,0))>0
and use an IF to get the Y,N
=IF( index(tab2!$B$2:$B$100,match(A2,tab2!$A$2:$A$100,0))>0 , "Y", "N")
no if for any reason the name is not in the tab2 - then you will get an error N/A in that case we can put "Not in table"

=IFERROR(IF( index(tab2!$B$2:$B$100,match(A2,tab2!$A$2:$A$100,0))>0 , "Y", "N"),"Not in table")

Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,027
Members
452,374
Latest member
keccles

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