Forum Discussion
Anonymous
2 years agoNot applicable
Excel Column Splitting
Hi, I want to split data available in 2 columns. It seems to be not straightforward, as I want multiple entry text data in a single cell (Column 1) to be mapped against same row Column 2 data, so th...
- Anonymous2 years ago
Hi Anonymous
This is my solution. You may have a try!
let Source = Excel.CurrentWorkbook(), Table2 = Source{[Name="Table1"]}[Content], #"Changed Type" = Table.TransformColumnTypes(Table2,{{"Contact name", type text}, {"Job Title", type text}}), #"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Contact name] <> null and [Contact name] <> ""), Custom1 = Table.FromColumns(List.Transform(Table.ToColumns(#"Filtered Rows"), each List.Combine(List.Transform(_, each Text.Split(_, "#(lf)")))), {"Contact Name", "Job Title"}) in Custom1From
into
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Anonymous
2 years agoNot applicable
Hi Vijay - here is the data.
| Original Data | ||
| Contact name | Job Title | |
| 1. Sam Kennedy 2. John Kennedy | 1. Software Engineer 2. Manager | [email protected] [email protected] |
Anonymous
2 years agoNot applicable
Hi Anonymous
This is my solution. You may have a try!
let
Source = Excel.CurrentWorkbook(),
Table2 = Source{[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Table2,{{"Contact name", type text}, {"Job Title", type text}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Contact name] <> null and [Contact name] <> ""),
Custom1 = Table.FromColumns(List.Transform(Table.ToColumns(#"Filtered Rows"), each List.Combine(List.Transform(_, each Text.Split(_, "#(lf)")))), {"Contact Name", "Job Title"})
in
Custom1
From
into
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!