我在速度方面優化了壹下,試試能否滿足需要
Sub Macro1()
'
' Macro1 Macro
'
'
Dim I As Integer, zROW As Integer, zR2 As Integer
Dim zDATA()
zROW = Range("A1").End(xlDown).Row
ReDim zDATA(zROW, 2)
zDATA = Range("A1:B" & zROW)
zR2 = 0
Application.ScreenUpdating = False
For I = 1 To zROW
If Columns("C:C").Find(What:=zDATA(I, 1)) Is Nothing Then
zR2 = zR2 + 1
Cells(zR2, 3) = zDATA(I, 1)
Cells(zR2, 4) = zDATA(I, 2)
Else
Columns("C:C").Find(What:=zDATA(I, 1)).End(xlToRight).Next = zDATA(I, 2)
End If
Next
Application.ScreenUpdating = True
End Sub