And here is another means to accomplish the results. Use Power Query. Here is the Mcode
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}, {"Products Ordered", type text}}),
#"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(#"Changed Type", {{"Products Ordered", Splitter.SplitTextByDelimiter("#(lf)", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Products Ordered"),
#"Filtered Rows" = Table.SelectRows(#"Split Column by Delimiter", each ([Products Ordered] <> ""))
in
#"Filtered Rows"
Review PQ steps
M-code basics:
- "let" is the start of a query
- "in" is the closing of a query
- each transformation step sits in between those 2 lines
- each step line is ended by a comma, except the last one
- "Source" is always the first step (Source Data)
- After "in" you have the last step referenced
Excel 2016 (Windows) 32 bit
|
A |
B |
1 |
Name |
Products Ordered |
2 |
Tom |
Apple |
3 |
Tom |
Banana |
4 |
Tom |
Cherry |
5 |
Tom |
Dragonfruit |
6 |
**** |
Apple |
7 |
**** |
Fries |
8 |
**** |
Mango |
9 |
**** |
Cherry |
10 |
Harry |
Cherry |
11 |
Harry |
Banana |
12 |
Harry |
Fries |
13 |
John |
Mango |
14 |
John |
Drqgonfruit |
Bookmarks