答案 0 :(得分:0)
尝试此代码
Sub Test()
Dim a, e, x
a = Sheet1.Range("A1:A" & Sheet1.Cells(Rows.Count, 1).End(xlUp).Row).Value
With CreateObject("Scripting.Dictionary")
.CompareMode = 1
.Item("Item") = "Count"
For Each e In a
If e <> "" Then
For Each x In Split(e, ", ")
.Item(Trim(x)) = .Item(Trim(x)) + 1
Next x
End If
Next e
a = Application.Transpose(Array(.keys, .items))
End With
Sheet1.Range("C1").Resize(UBound(a, 1), 2).Value = a
End Sub