How to vlookup when table array columns has multiple values

ExcelNoob222

Board Regular
Joined
Jun 17, 2020
Messages
77
Office Version
  1. 365
Platform
  1. Windows
Hi all,

In tab one I have two columns such as:

ItemValue
1234
5478
8978
4587

I want to vlookup data from tab2 into the value column on tab1. Tab2 looks like:

ItemValue
1234, 54782
8978, 45875

So tab one should look like:

Item
12342
54782
89785
45875

Additional Info:

The item column on tab2, may contain more than 2 item numbers per row. Could be 5, or 10 etc. The item numbers will always be the same character count and each row will always be unique (so item 1234 on row 2 will only be on row 2, it will not show up again on say row 10).

Any help would be appreciated!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Maybe:
Sheet1
Book1
AB
1ItemValue
212342
354782
489785
545875
Sheet1
Cell Formulas
RangeFormula
B2:B5B2=FILTER(Sheet2!$B$2:$B$3,ISNUMBER(SEARCH(A2,Sheet2!$A$2:$A$3)),"No Match")


Sheet2
Book1
AB
1ItemValue
21234, 54782
38978, 45875
Sheet2
 
Upvote 0
Solution
Maybe:
Sheet1
Book1
AB
1ItemValue
212342
354782
489785
545875
Sheet1
Cell Formulas
RangeFormula
B2:B5B2=FILTER(Sheet2!$B$2:$B$3,ISNUMBER(SEARCH(A2,Sheet2!$A$2:$A$3)),"No Match")


Sheet2
Book1
AB
1ItemValue
21234, 54782
38978, 45875
Sheet2
Hi!

That is awesome, worked perfectly. Thank you for your help. Are you able to explain how this works??
 
Upvote 0
You're welcome.
The SEARCH function looks for the item. If it finds it it will return a number which is the starting position in the string where it found the item.
So, for cell B2 in the example
SEARCH(A2,Sheet2!$A$2:$A$3)
will return
{1;#VALUE!}
ISNUMBER will return either a TRUE or FALSE to the FILTER function
ISNUMBER(SEARCH(A2,Sheet2!$A$2:$A$3))
will return
{TRUE;FALSE}
Then FILTER will return the value in B2 of sheet2 since there is a TRUE in the first row.
 
Upvote 0
You're welcome.
The SEARCH function looks for the item. If it finds it it will return a number which is the starting position in the string where it found the item.
So, for cell B2 in the example
SEARCH(A2,Sheet2!$A$2:$A$3)
will return
{1;#VALUE!}
ISNUMBER will return either a TRUE or FALSE to the FILTER function
ISNUMBER(SEARCH(A2,Sheet2!$A$2:$A$3))
will return
{TRUE;FALSE}
Then FILTER will return the value in B2 of sheet2 since there is a TRUE in the first row.

Great, thanks for providing explanation.
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,643
Members
449,093
Latest member
Ahmad123098

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