
Originally Posted by
MrRAMMounts
Yes, this is how I am hoping to display the extracted data.
so you can use Power Query
// Table2
let
Tbl1 = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
P2P = Table.AddColumn(Source, "Custom", each Tbl1),
Exp = Table.ExpandTableColumn(P2P, "Custom", {"Product Code"}, {"Product Code"}),
IF = Table.AddColumn(Exp, "Custom", each if Text.Contains([Ordered Products], [Product Code]) then [Product Code] else null),
TSR = Table.SelectRows(IF, each ([Custom] <> null)),
Grp = Table.Group(TSR, {"Ordered Products"}, {{"Count", each _, type table}}),
List = Table.AddColumn(Grp, "PC", each [Count][Custom]),
Ext = Table.TransformColumns(List, {"PC", each Text.Combine(List.Transform(_, Text.From), ","), type text}),
Split = Table.SplitColumn(Ext, "PC", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), {"PC.1", "PC.2", "PC.3", "PC.4"})
in
Split
Bookmarks