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
ABC (Does value exist in table arrays)
1BobCL30NFormula
2BobVA21Formula
3BobVA23Formula

<tbody>
</tbody>

Sheet2 below
AB (range/table array 1)C (range/table array 2)
1BobCL30NR1
2BobR5R6
3BobD3VA23

<tbody>
</tbody>

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

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.
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,217,200
Messages
6,135,161
Members
449,914
Latest member
JSW

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