multiple values in cells vlookup from table list

Chocho

New Member
Joined
Feb 18, 2015
Messages
7
Could someone help me what formula to use for below?

I have values separated by commas in sheet 1 column A (about 500 rows of values) and I would like to have a formula that looks up any value in these cells from sheet 1 column A and if it matches with any value in sheet 2 column A (has about about 300 rows of values), to return the value "offshore", otherwise "unknown" in sheet 1's column B.

Sheet 1:
Row/ColAB
110,11,12offshore
215offshore
347offshore
411,2020offshore
565unknown
6899unknown
718,1367,8788offshore

<tbody>
</tbody>


SHEET 2:
in Col A
10
11
12
13
14
15
18
47
56
120
145

<tbody>
</tbody>
P.S my excel is delimited by semicomma so the formula will have to use ";" instead of "," for function
 
Last edited:

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi.

Assuming that the entries in Sheet1 column A are only ever separated by a single comma, as in your examples (and not e.g. by a comma followed by a space), and based on a Sheet2 range of A1:A300 (amend as required), in B1:

=IF(SUMPRODUCT(N(ISNUMBER(SEARCH(","&Sheet2!$A$1:$A$300&",",","&Sheet1!A1&",")))),"offshore","unknown")

Copy down to give similar results for strings in A2, A3, etc.

Regards
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,822
Members
449,469
Latest member
Kingwi11y

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