Sub Extraire6()
Dim DL1 As Long, DL2 As Long, i As Long
Dim Plage1 As Range, Cel As Range, Trouve As Range, Ws As String
With Sheets("Export")
DL1 = .Range("A65000").End(xlUp).Row
For i = 2 To DL1
.Cells(i, 4) = Mid(.Cells(i, 1), 1, 6)
Next
.Range("A1:D" & DL1).Sort Key1:=Range("D2"), Order1:=xlAscending, Header:=xlGuess
For i = DL1 To 2 Step -1
If .Cells(i, 4) = .Cells(i - 1, 4) Then
.Cells(i - 1, 2) = .Cells(i - 1, 2) + .Cells(i, 2)
.Rows(i).Delete
End If
Next
Set Plage1 = .Range("D2:D" & .Range("A65000").End(xlUp).Row)
End With
With Sheets("Base Vulc")
For Each Cel In Plage1
Set Trouve = .Range("B3:B" & .Range("A65000").End(xlUp).Row).Find(Cel)
If Not Trouve Is Nothing Then
If Trouve.Offset(0, -1) = "Z1" Then Ws = "Zone 1_S01" Else: Ws = "Zone 2_S01"
With Sheets(Ws)
DL2 = .Range("A65000").End(xlUp).Row + 1
.Cells(DL2, 1) = Cel.Value
.Cells(DL2, 2) = Trouve.Offset(0, 6)
.Cells(DL2, 4) = Trouve.Offset(0, 7)
.Cells(DL2, 5) = Trouve.Offset(0, 5)
.Cells(DL2, 6) = Trouve.Offset(0, 3)
.Cells(DL2, 7) = Trouve.Offset(0, 8)
End With
End If
Next
End With
End Sub