
Option Explicit
Sub abc()
Dim a, i, d, t
a = [a1].CurrentRegion.Value
Set d = CreateObject("scripting.dictionary")
t = Split("A,甲,", ",") '条件
For i = 2 To UBound(a)
If a(i, 2) = t(0) And a(i, 3) = t(1) Then d(a(i, 1)) = d(a(i, 1)) + 1
Next
t(2) = d.Count
[a2].Offset(, UBound(a, 2) + 1).Resize(, 3) = t
End Sub