1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
Dim tabInt As Variant
Dim tabDon As Variant
Dim tabDoubl As Variant
Dim compt As Byte
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
tabInt = ActiveWorkbook.Sheets("final").Cells(1, 1).CurrentRegion
ReDim tabDon(LBound(tabInt) To UBound(tabInt))
For I = LBound(tabInt) To UBound(tabInt)
tabDon(I) = tabInt(I, varColRech1) & tabInt(I, varColRech2) & tabInt(I, varColRech3)
Next I
ReDim tabDoubl(1 To 1)
compt = 0
Set AL = CreateObject("System.Collections.ArrayList")
With AL
For I = LBound(tabDon) To UBound(tabDon)
If Not .contains(tabDon(I)) Then
.Add tabDon(I)
Else
If compt = 0 Then
tabDoubl(1) = I
compt = compt + 1
Else
ReDim Preserve tabDoubl(LBound(tabDoubl) To UBound(tabDoubl) + 1)
tabDoubl(UBound(tabDoubl)) = I
End If
End If
Next I
If compt <> 0 Then
For I = UBound(tabDoubl) To LBound(tabDoubl) Step -1
ActiveWorkbook.Sheets("final").Rows(tabDoubl(I)).Delete
Next I
End If
End With |
Partager