Split cell by delimiter into specific columns

Danny54

Active Member
Joined
Jul 3, 2019
Messages
295
Office Version
  1. 365
Platform
  1. Windows
Is it possible to use Power Query to split comma delimited data in a excel worksheet into specific new columns?

the actual input sheet has 120,000 rows
the actual input sheet has 2 cols
the comma delimited data in column b can be split into 160 new cols

Input sheet
1630514280158.png


output sheet (notice all the a's are lined up in one column, all the d's in one column ect..
1630514343913.png


Thanks
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Please try


Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    ToRecord = Table.TransformColumns(Source, {{"Values", each Record.FromList(Text.Split(_,","), Text.Split(_,",")) }}),
    Expanded = Table.ExpandRecordColumn(ToRecord, "Values",List.Distinct(Text.Split(Text.Combine(Source[Values],","),",")))
in
    Expanded

Book1
ABCDEFGHIJK
1ColorValuesColoradjzbbcf
2Reda,d,j,zRedadjz
3Orangea,bb,c,dOrangeadbbc
4GreenbbGreenbb
5Brownd,fBrowndf
Sheet1
 
Upvote 0

Forum statistics

Threads
1,223,701
Messages
6,173,916
Members
452,538
Latest member
ralphtaylor466

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