用VBA吧,老版本去重写起来也麻烦
Sub test()
Dim arr, i%, j%, dic As Object
arr = Range("a1").CurrentRegion.Value
Set dic = CreateObject("scripting.dictionary")
For i = 2 To UBound(arr)
For j = 1 To UBound(arr, 2)
dic(arr(i, j)) = dic(arr(i, j)) + 1
Next j
Next i
Range("o1").Resize(dic.Count) = Application.Transpose(dic.keys)
Range("p1").Resize(dic.Count) = Application.Transpose(dic.items)
End Sub