Possible?
Trying to get a non-vba solution to have a vlookup return the word "MULTI" if there are multiple RETURN values for a lookup values. Example:
[TABLE="width: 466"]
<tbody>[TR]
[TD][TABLE="width: 466"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]lookup values[/TD]
[TD][/TD]
[TD]Array[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]Holga[/TD]
[TD][/TD]
[TD]小非[/TD]
[TD="align: right"]9854[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]Doña[/TD]
[TD="align: right"]3023[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD][/TD]
[TD][/TD]
[TD]Doña[/TD]
[TD="align: right"]3023[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]Holga[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]Holga[/TD]
[TD="align: right"]382983724[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]=VLOOKUP(A2,C:D,2,FALSE)[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
(!) Notice the difference between Doña and Holga. Doña has identical return values and Holga has different return values. The solution should return the text "MULTI" for Holga, but should NOT return "MULTI" for Doña (it should return '3023').
Or does anyone have a more elegant solution? Keep in the mind the dataset spans several hundred thousand lines so needs to consider resources for scale up. Many thanks in advance.
Trying to get a non-vba solution to have a vlookup return the word "MULTI" if there are multiple RETURN values for a lookup values. Example:
[TABLE="width: 466"]
<tbody>[TR]
[TD][TABLE="width: 466"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]lookup values[/TD]
[TD][/TD]
[TD]Array[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]Holga[/TD]
[TD][/TD]
[TD]小非[/TD]
[TD="align: right"]9854[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]Doña[/TD]
[TD="align: right"]3023[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD][/TD]
[TD][/TD]
[TD]Doña[/TD]
[TD="align: right"]3023[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]Holga[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]Holga[/TD]
[TD="align: right"]382983724[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]=VLOOKUP(A2,C:D,2,FALSE)[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
(!) Notice the difference between Doña and Holga. Doña has identical return values and Holga has different return values. The solution should return the text "MULTI" for Holga, but should NOT return "MULTI" for Doña (it should return '3023').
Or does anyone have a more elegant solution? Keep in the mind the dataset spans several hundred thousand lines so needs to consider resources for scale up. Many thanks in advance.
Last edited: