vlookup duplicate lookup value always only returns first value in column index

Ken Soona

New Member
Joined
Feb 19, 2014
Messages
29
The title might seem confusing, sorry. I hope the example data make it clear.

My data table always has duplicates in the lookup value, an ID numbers, but not always for the value in the column_index_number that I'm referencing. See below.

[TABLE="width: 200"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]append process[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]2017 survey[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]append process[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]102[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]102[/TD]
[TD]2017 survey[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

My vlookup table has a unique set of each ID, and two columns for vlookups.
[TABLE="width: 200"]
<tbody>[TR]
[TD]ID[/TD]
[TD]app[/TD]
[TD]svy[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]1[/TD]
[TD](1)[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]102[/TD]
[TD][/TD]
[TD](1)[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I need to vlookup table to populate a 1 for each app n svy column. The problem, I think, is that the vlookup is looking at the first instance of the ID, and returning whatever is in the col reference, rather than looking at all of them. The 1's in parentheses are what I need that I can't get to derive.

For the App column, I have:

=IF(VLOOKUP(A2,data!$A$2:$B$6,2,FALSE)="append process",1,"")

...This is fine, it's getting me all the 1's my heart desires.

For the svy column, I have:
=IF(VLOOKUP(A2,data!$A$2:$B$6,2,FALSE="2017 survey",1,"")

I have seen formulas that can find multiple iterations of something in a vlookup, but I need to specify if I want the 2nd, 3rd, etc. That is unhelpful, b/c sometimes it's the 1st, or 3rd, or 7th. I need it to look across ALL instances, and find that match.

I think I'm close but for whatever reason I just can't seem to get it to work right.

Thank you for your help in advance!
 
Last edited:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Maybe:
Copy formulas down as needed.
Excel Workbook
ABC
1IDValue
2100append process
31002017 survey
4101append process
5101
6102
71022017 survey
8
9
10IDappsvy
1110011
121011
131021
Sheet
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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