Single line data into multiple rows

selant

Board Regular
Joined
Mar 26, 2009
Messages
109
I have datas in A column. For example A1 :

AB 1524 - AB 1457 - AB 4158

How can i turn this data into multiple rows into a different worksheet ( "-" character will be the split character and i would need to trim spaces in the beginning and end) such as following :

AB 1524
AB 1457
AB 4158

There are lots of data in source column A, which means the function i require needs to be in a loop format if possible.

Any helps appreciated.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Assuming there are only ever 3 codes on a row. . .

1) Text to columns with hyphen as delimiter
2) Use Helper column to trim spaces
3) copy and paste the extra 2 columns below column A
 
Upvote 0
hi special-k99 thank you for solution but its not fixed that a row contains 3 codes. It may differ more or less. May be 4 codes, or only single code.
 
Upvote 0

Forum statistics

Threads
1,203,123
Messages
6,053,638
Members
444,675
Latest member
FedElecQaEng

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