VLOOKUP across duplicates, returning value if found in another table

jbo165

New Member
Joined
Jul 21, 2009
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi there,

I need to do a VLOOKUP using a value that appears multiple times in a column. Instead of excel returning me the first value as the VLOOKUP result, I would like it to return the option that also exists in another table.

Here is the table where the duplicate value exists. I am looking up 54816 to retrieve a value from column D.

1691514840494.png


However, I would like to return the option from column D that is also contained in another simple table, held on another tab/sheet.

1691514826975.png


So in this case, I would like the result of the lookup to be 27091.

What should my formula be to achieve this?

Thank you very much in advance for your help!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
jbo I don't know about the others, but I am having a time trying to understand your problem. I am going to recommend downloading that XL2BB. Show us the input and what you want for a result. "I am looking up 54816 to retrieve a value from column D." Which value? "So in this case, I would like the result of the lookup to be 27091." So why would 27091 be the solution? Let's get the ball rollin and start a dialog.
 
Upvote 0
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’)

It would also be better if we could copy your sample data for testing. Could you post it again using XL2BB as suggested previously but post it after manually entering the desired result(s) so that we can be sure what that is and where it is? Add any further written explanation that you can.
 
Upvote 0
Thanks for the replies, and apologies for not being clear. It's hard to find the right language to articulate the challenge!

My formula is currently in C3 and D3. This is a plain VLOOKUP, and presently returns the first matches from Table A because of the duplicate values in A7-A10.

What I would like instead is for this lookup into table A to return the Parent Org and Parent ID that is also found in Table B. I have outlined what this should be, in the case of the data below, in the 'Desired' section.

The straight language description of this problem is: a child ID can be associated with multiple parent IDs. I need to identify the parent ID which is also contained in a separate list, and therefore complies with other criteria I have.

Thank you again!

Example.xlsx
ABCD
1LOOKUP
2Child IDChild OrgParent OrgParent ID
354816Institut de Recherche en Informatique de ToulouseCentre National de la Recherche Scientifique27051
4
5DESIRED!
6Child IDChild OrgParent OrgParent ID
754816Institut de Recherche en Informatique de ToulouseUniversite Toulouse III Paul Sabatier27091
8
9TABLE A
10Child IDChild OrgParent OrgParent ID
1154816Institut de Recherche en Informatique de ToulouseCentre National de la Recherche Scientifique27051
1254816Institut de Recherche en Informatique de ToulouseToulouse INP27088
1354816Institut de Recherche en Informatique de ToulouseUniversite Toulouse III Paul Sabatier27091
1454816Institut de Recherche en Informatique de ToulouseInstitut de Recherche en Informatique de Toulouse54816
15
16TABLE B
17Parent IDParent Org
1836900APHM - Assistance publique - Hôpitaux de Marseille
1926990Centre Hospitalier Régional Universitaire de Brest - CHRU Brest
2037045Centre Hospitalier Universitaire de Nice - CHU Nice
2127091Université Toulouse III - Paul Sabatier
2236672Centre Hospitalier Universitaire de Nîmes - CHU Nimes
2355052Centre Hospitalier Universitaire de Rouen
Table 1
Cell Formulas
RangeFormula
C3C3=VLOOKUP(A3,A10:D14,3,0)
D3D3=VLOOKUP(A3,A10:D14,4,0)
 
Upvote 0
Apologies, when I write 'My formula is currently in C3 and D3. This is a plain VLOOKUP, and presently returns the first matches from Table A because of the duplicate values in A7-A10.', the duplicate values are actually A11-A14.
 
Upvote 0
because of the duplicate values in A7-A10.', the duplicate values are actually A11-A14.
Are those ranges correct (especially the first one)?

In words, step us through the process of obtaining the correct result manually.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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