split rows and copy value in adjacent column

kristofke

New Member
Joined
Dec 22, 2013
Messages
14
Hi

I have a list of EAN codes, but some rows have multiple EAN codes in them. I need to do a vertical search on these to get the price from column B, but this doesn't work because the multiple values in one cell like A3 are text and the vertical search does not return the value from column B if one of the searched EAN codes is for example in A3.

How can I split the rows and copy the price with every EAN code that is split.

For example:

1609758438185.png


Should become:

1609758700659.png
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
If you have concat(), consider these formulas with CSE.

At C1 and down
=TRIM(MID(SUBSTITUTE(CONCAT(SUBSTITUTE($A$1:$A$10,CHAR(10),",")&","),",",REPT(" ",LEN(CONCAT(SUBSTITUTE($A$1:$A$10,CHAR(10),",")&",")))),1+(ROW($A1)-1)*LEN(CONCAT(SUBSTITUTE($A$1:$A$10,CHAR(10),",")&",")),LEN(CONCAT(SUBSTITUTE($A$1:$A$10,CHAR(10),",")&","))))

At D1 and down,
=LOOKUP(100,SEARCH(C10,$A$1:$A$10),$B$1:$B$10)
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,816
Members
449,049
Latest member
cybersurfer5000

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