Does value exist in 2 or more table arrays (VLOOKUP)

Formulation

New Member
Joined
Aug 26, 2016
Messages
25
I want find out if B2 in Sheet1 exists in column B or C in Sheet2.
If B2 exists in either column B or C in Sheet2, I would like to display Yes or True.
If B2 does not exist column B or C in Sheet2, I would like to display No or False.

For example:
Sheet1
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C (Does value exist in table arrays)[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Bob[/TD]
[TD]CL30N[/TD]
[TD]Formula[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Bob[/TD]
[TD]VA21[/TD]
[TD]Formula[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Bob[/TD]
[TD]VA23[/TD]
[TD]Formula[/TD]
[/TR]
</tbody>[/TABLE]

Sheet2 below[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B (range/table array 1)[/TD]
[TD]C (range/table array 2)[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Bob[/TD]
[TD]CL30N[/TD]
[TD]R1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Bob[/TD]
[TD]R5[/TD]
[TD]R6[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Bob[/TD]
[TD]D3[/TD]
[TD]VA23[/TD]
[/TR]
</tbody>[/TABLE]

Looking up to see if a value exists in one column on Sheet2 works fine... I'm just having trouble figuring out how to see if the value exists in multiple columns.
- I was using formula =VLOOKUP(B2,'Sheet2'!$B:$B,1, FALSE) in C1 of Sheet1. Which works for one column... how can I get it to work with multiple columns?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Smashing arrays together seems more logical and easier to conceptualise. Try these two array formulas in C3 and D3. Invoke each correctly and copy down.


Book1
ABCD
1Sheet1
2ABC (Does value exist in table arrays)D (Does value exist in table arrays)
3BobCL30NYesYes
4BobVA21NoNo
5BobVA23YesYes
6
7Sheet2 below
8AB (range/table array 1)C (range/table array 2)
9BobCL30NR1
10BobR5R6
11BobD3VA23
Sheet31
Cell Formulas
RangeFormula
C3{=IF(MAX((A3&B3=$A$9:$A$11&$B$9:$B$11)+(A3&B3=$A$9:$A$11&$C$9:$C$11)),"Yes","No")}
D3{=IF(MAX(--(A3&B3=$A$9:$A$11&$B$9:$C$11)),"Yes","No")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,185
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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