1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Sub toto()
Dim i As Long, k As Long
Dim secteur as string, region as string
secteur = Feuil1.Range("E4")
region = Feuil1.Range("E10")
k=15
Application.ScreenUpdating = False
For i = 2 To Feuil2.Range("A1").End(xlDown).Row
If Feuil2.Cells(i, 1) = region And Feuil2.Cells(i, 2) = secteur Then
Feuil1.Cells(k, 2) = Feuil2.Cells(i, 1)
Feuil1.Cells(k, 3) = Feuil2.Cells(i, 2)
Feuil1.Cells(k, 4) = Feuil2.Cells(i, 3)
Feuil1.Cells(k, 5) = Feuil2.Cells(i, 4)
Feuil1.Cells(k, 6) = Feuil2.Cells(i, 5)
k = k + 1
End If
Next i
Application.ScreenUpdating = True
End Sub |
Partager