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

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
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
444,555444
formula finding 444
=LEFT(A1,SEARCH(",",A1)-1)
sorry I had extra ")" on the end of the formula

<colgroup><col width="64" span="5" style="width:48pt"> </colgroup><tbody>
</tbody>
 
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,215,488
Messages
6,125,092
Members
449,206
Latest member
ralemanygarcia

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