try Power Query
source |
|
source |
Count |
Bob, John, Ken, Bob |
|
Bob |
2 |
// Table1
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
SplitR = Table.ExpandListColumn(Table.TransformColumns(Source, {{"source", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "source"),
Trim = Table.TransformColumns(SplitR,{{"source", Text.Trim, type text}}),
Grp = Table.Group(Trim, {"source"}, {{"Count", each Table.RowCount(_), type number}}),
Desc = Table.Sort(Grp,{{"Count", Order.Descending}}),
FirstN = Table.FirstN(Desc,1)
in
FirstN
or
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
List = Table.AddColumn(Source, "Name", each Text.Split([source],",")),
Trim = Table.TransformColumns(Table.ExpandListColumn(List, "Name"),{{"Name", Text.Trim, type text}}),
Grp = Table.Group(Trim, {"Name"}, {{"Count", each Table.RowCount(_), type number}}),
FirstN = Table.FirstN(Table.Sort(Grp,{{"Count", Order.Descending}}),1)
in
FirstN
Bookmarks