Vlookup value after comma+space and return each value seperated by comma+space till the last comma+space in the cell

sandeepsandeep

New Member
Joined
Dec 21, 2017
Messages
10
I have a query which I am unable to solve.

I have certain Values in Sheet1 in Col A as below
991121QR5, 991121XSX, 991234SSC, 991121SDF

In Sheet2 I have following Values in Col A and B
991121QR5 100100
991121SDF 121212
991234SSC 123456
991121XSX 888888

I want to vlookup each value after comma+space with the table in Sheet2 till the last comma+space in the series.

So when I enter the following in Col A
991121QR5, 991121XSX, 991234SSC, 991121SDF

Result should look like this in Col B
100100, 888888, 123456, 121212

Thanks in advance.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
if you cannot change how the data is, chop it up in helper columns using

=left(a1,search(",",a1)-1))

and for the rest use the mid function with search
 
Upvote 0
[TABLE="width: 320"]
<colgroup><col width="64" span="5" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl22, width: 64"]444,555[/TD]
[TD="width: 64"]444[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="colspan: 2"]formula finding 444[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="colspan: 3"]=LEFT(A1,SEARCH(",",A1)-1)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]sorry I had extra ")" on the end of the formula[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Yeah it's a pretty terrible design.

I'd use something like

=VLOOKUP(LEFT(A2,9),Sheet2!A:B,2,FALSE)&", "&VLOOKUP(MID(Sheet1!A2,12,9),Sheet2!A:B,2,FALSE)&", "&VLOOKUP(MID(A2,23,9),Sheet2!A:B,2,FALSE)&", "&VLOOKUP(RIGHT(Sheet1!A2,9),Sheet2!A:B,2,FALSE)

That will complete the "output" column.
 
Upvote 0
Yeah it's a pretty terrible design.

I'd use something like

=VLOOKUP(LEFT(A2,9),Sheet2!A:B,2,FALSE)&", "&VLOOKUP(MID(Sheet1!A2,12,9),Sheet2!A:B,2,FALSE)&", "&VLOOKUP(MID(A2,23,9),Sheet2!A:B,2,FALSE)&", "&VLOOKUP(RIGHT(Sheet1!A2,9),Sheet2!A:B,2,FALSE)

That will complete the "output" column.
Nope that does not work
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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