I need to find the unique values from a list and the number of times each value occurred in the original list. Here is what i have so far:
Dim Lister As New List(Of String)()
For Each item In eColumn
Lister.Add(item.value)
Next
Dim Result As New List(Of String)
Result = Lister.Distinct().ToList
For Each st In Result
MsgBox(st)
Next
The result is a list of all the unique values, but does not include a count for each item. For example, if my list was
John
John
Abbey
Larry
Larry
Larry
Charles
I want 4 values returned: John = 2, Abbey = 1,Larry = 3, Charles = 1.