Function TraiCay(ByVal Rng As Range) As String
Dim S, Z, Dic As Object, tmp, i&, Res$
Set Dic = CreateObject("scripting.dictionary")
For Each tmp In Rng
S = Split("," & tmp, ",")
For i = 1 To UBound(S)
If InStr(1, S(i), ":") > 0 Then
Z = Split(Trim(S(i)), ":")
If Z(0) <> Empty And IsNumeric(Z(1)) = True Then
If Dic.exists(Z(0)) = False Then
Dic.Add Z(0), Val(Z(1))
Else
Dic.Item(Z(0)) = Dic.Item(Z(0)) + Val(Z(1))
End If
End If
End If
Next i
Next tmp
For Each tmp In Dic.keys
Res = Res & ", " & tmp & ": " & Dic.Item(tmp)
Next tmp
If Res <> Empty Then TraiCay = Mid(Res, 3, Len(Res) - 2)
End Function