Cut list into pieces that are marked by /

Sorttaaja2

New Member
Joined
Jan 23, 2018
Messages
14
How to cut list into pieces that are marked by / ?


so that 1/2/3/4


would become


1/
2/
3/
4/






By doing a macro? so that it would cut after / and paste into new row? and repeat until the last / ?




Thankyou :rolleyes:
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
with your example you can try PowerQuery aka Get&Transform
Code:
[SIZE=1]let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(Source, {{"Column1", Splitter.SplitTextByDelimiter("/", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Column1"),
    #"Added Suffix" = Table.TransformColumns(#"Split Column by Delimiter", {{"Column1", each _ & "/", type text}})
in
    #"Added Suffix"[/SIZE]

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#5B9BD5]Column1[/td][td][/td][td=bgcolor:#70AD47]Column1[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]1/2/3/4[/td][td][/td][td=bgcolor:#E2EFDA]1/[/td][/tr]

[tr=bgcolor:#FFFFFF][td][/td][td][/td][td]2/[/td][/tr]

[tr=bgcolor:#FFFFFF][td][/td][td][/td][td=bgcolor:#E2EFDA]3/[/td][/tr]

[tr=bgcolor:#FFFFFF][td][/td][td][/td][td]4/[/td][/tr]
[/table]
 
Upvote 0
Hi,

Another way, with formula:


Book1
AB
11/2/3/41/
22/
33/
44/
Sheet335
Cell Formulas
RangeFormula
B1=TRIM(MID(SUBSTITUTE(A$1&"/","/","/"&REPT(" ",100)),ROWS(B$1:B1)*100-99,100))


Formula copied down as far as needed.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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