Bonsoir,
Voici un exemple conçu à partir d'une méthode de @+Thierry que j'ai trouvé formidablement formidable
)
@+
Ronan
P.S. : Pour le ZIP, même méthode.
Pour info :
Sub Extract()
Dim plage As Variant
Dim plage2() As Variant
With Sheets("feuil2")
ligne = .Cells(65536, 2).End(xlUp).Row
If ligne >= 6 Then
.Range("b6:d" & ligne).ClearContents
End If
End With
With Sheets("feuil1")
plage = .Range("b6:g" & .Cells(65536, 2).End(xlUp).Row)
End With
If UBound(plage, 1) < 1 Then Exit Sub
For i = 1 To UBound(plage, 1)
If Year(plage(i, 6)) <= Year(Date) + 1 Then
ReDim Preserve plage2(2, x)
plage2(0, x) = plage(i, 2)
plage2(1, x) = plage(i, 3)
plage2(2, x) = plage(i, 6)
x = x + 1
End If
Next i
For i = 0 To UBound(plage2, 2)
With Sheets("feuil2")
.Cells(i + 6, 2) = plage2(0, i)
.Cells(i + 6, 3) = plage2(1, i)
.Cells(i + 6, 4) = plage2(2, i)
End With
Next i
End Sub