Split data in to rows, new line

CypherBit

New Member
Joined
Jan 7, 2006
Messages
27
Office Version
  1. 2019
Platform
  1. Windows
We have a spreadsheet with thousands of rows, that looks like this:
1668762622181.png


We need to (if at all possible with formulas only) separate the data (; is the separator) in such a way that the first row above ends up looking like this (obviously it's needed for all the rows, the data must be moved downwards):
1668762915830.png


I've been searching and searching, but my Excel-foo is not up to par. Can someone please help us out?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
It may not be Excel 2019, but it's possible with:

Excel Formula:
=DROP(REDUCE(0,SEQUENCE(COUNTA(A:A)),LAMBDA(x,y,VSTACK(x,LET(z,TEXTSPLIT(INDEX(C:C,y),":",";",1),q,CHOOSEROWS(A:B,y)&"",HSTACK(IFERROR(EXPAND(q,ROWS(z)),q),TAKE(z,,-1),TAKE(z,,1)))))),1)

This is for ms365 and Excel Online where the latter is free to use I believe. See if you can utilize that.

khsRy.png
 
Upvote 0
Solution
For 2019 I think power query would be the simplest option.
 
Upvote 0
Another option available in Excel 2019 would be to load the data in PowerQuery and split column c into new columns and rows. With some restructuring you could use the below M-Code

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(Source, {{"Column3", Splitter.SplitTextByDelimiter(";", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Column3"),
    #"Split Column by Delimiter1" = Table.SplitColumn(#"Split Column by Delimiter", "Column3", Splitter.SplitTextByDelimiter(":", QuoteStyle.Csv), {"Column3.1", "Column3.2"}),
    #"Reordered Columns" = Table.ReorderColumns(#"Split Column by Delimiter1",{"Column1", "Column2", "Column3.2", "Column3.1"}),
    #"Filtered Rows" = Table.SelectRows(#"Reordered Columns", each ([Column3.2] <> null))
in
    #"Filtered Rows"

ESgwy.png
 
Upvote 0
Thank you very much. While I'm on 2019, I do have access to O365 version and have just tested it and it appears to be exactly what we need. Much appreciated.
 
Upvote 0

Forum statistics

Threads
1,223,630
Messages
6,173,454
Members
452,514
Latest member
cjkelly15

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