Public Sub TimTrung()
Dim Dic As Object, sArr(), dArr(), I As Long, Tem As String
Set Dic = CreateObject("Scripting.Dictionary")
sArr = Range([A3], [A3].End(xlDown)).Resize(, 5).Value
ReDim dArr(1 To UBound(sArr, 1), 1 To 1)
For I = 1 To UBound(sArr, 1)
Tem = sArr(I, 1) & "#" & sArr(I, 2) & "#" & sArr(I, 3) & "#" & sArr(I, 4) & "#" & sArr(I, 5)
If Not Dic.Exists(Tem) Then
Dic.Add Tem, I + 2
Else
Dic.Item(Tem) = Dic.Item(Tem) & ";" & I + 2
End If
Next I
For I = 1 To UBound(sArr, 1)
Tem = sArr(I, 1) & "#" & sArr(I, 2) & "#" & sArr(I, 3) & "#" & sArr(I, 4) & "#" & sArr(I, 5)
If InStr(Dic.Item(Tem), ";") Then dArr(I, 1) = Dic.Item(Tem)
Next I
[F3].Resize(UBound(sArr, 1)) = dArr
Set Dic = Nothing
End Sub