VBA to split delimited data in cell and duplicate row

dshafique

Board Regular
Joined
Jun 19, 2017
Messages
171
Hi everyone, I am hoping you guys can help me out with a roadblock I'm running into. I have this set of data, pretty linear, but one cell has multiple variables in it. I want to split the data in that cell, but duplicate everything else. Let me show you an example below:

ORIGINAL DATA
Delivery#ModifiedSCAC CodeDestinationDestination Sub NodeStatusAppointmentTotal Case Qty# of POCapacity Type
25269105​
28 Jan 2021, 01:04 PM (Central Standard Time)ROEV
6064​
Scheduled
1/30/2021​
2784​
0544085172 | 0544094338 | 0544092380 | 0544092341 |
Basic
80453253​
28 Jan 2021, 01:03 PM (Central Standard Time)ROEV
8307​
Scheduled
2/1/2021 15:00​
2400​
4572170915 | 3318916716 |Basic
25403457​
28 Jan 2021, 01:01 PM (Central Standard Time)COXS
7012​
Scheduled
2/2/2021 5:00​
6890​
2368508623 |Basic




DESIRED OUTCOME:
Delivery#ModifiedSCAC CodeDestinationDestination Sub NodeStatusAppointmentTotal Case Qty# of POCapacity Type
25269105​
28 Jan 2021, 01:04 PM (Central Standard Time)ROEV
6064​
Scheduled
1/30/2021​
2784​
0544085172Basic
2526910528 Jan 2021, 01:04 PM (Central Standard Time)ROEV6064Scheduled1/30/202127840544094338Basic
2526910528 Jan 2021, 01:04 PM (Central Standard Time)ROEV6064Scheduled1/30/202127840544092380Basic
2526910528 Jan 2021, 01:04 PM (Central Standard Time)ROEV6064Scheduled1/30/202127840544092341Basic
80453253​
28 Jan 2021, 01:03 PM (Central Standard Time)ROEV
8307​
Scheduled
2/1/2021 15:00​
2400​
4572170915Basic
8045325328 Jan 2021, 01:03 PM (Central Standard Time)ROEV8307Scheduled2/1/2021 15:0024003318916716Basic
25403457​
28 Jan 2021, 01:01 PM (Central Standard Time)COXS
7012​
Scheduled
2/2/2021 5:00​
6890​
2368508623Basic

the data in column for #PO has all the numbers split by a "|" even for the last one,

any help would be greatly appreciated

thanks
 
What version of Excel are you using.

Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

- Follow this link to learn how to install Power Query in Excel 2010 / 2013.

- Follow this link for an introduction to Power Query functionality.

- Follow this link for a video which demonstrates how to use Power Query code provided.
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,224,907
Messages
6,181,668
Members
453,059
Latest member
jkevin

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