Option Explicit
Sub abc()
Dim a, i, j, k, d, t, m, p
a = Range("a1:c" & [a1].End(xlDown).Row).Value
ReDim b(1 To UBound(a), 1 To UBound(a, 2))
Set d = CreateObject("scripting.dictionary")
For i = 1 To UBound(a)
t = a(i, 1) & "," & a(i, 2)
d(t) = d(t) & "," & i
Next
For Each i In d.keys
t = Split(d(i), ","): p = 0
For j = 1 To UBound(t)
m = m + 1
If p = 0 Then
For k = 1 To UBound(a, 2)
b(m, k) = a(t(j), k)
Next
p = 1
Else
b(m, 3) = a(t(j), 3)
End If
Next
Next
[e1].Resize(UBound(b), UBound(b, 2)) = b
End Sub