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
| Application.ScreenUpdating = False
NBLigSuivi = Application.CountA(Worksheets("Suivi").Range("B:B")) + 1
NbLigImport = Application.CountA(Worksheets("Import").Range("A:A"))
For i = 2 To NbLigImport
If Worksheets("Inter").Range("A:A").Find(Worksheets("Inter").Cells(i - 1, 2), LookIn:=xlValues) Is Nothing Then
Worksheets("Suivi").Cells(NBLigSuivi + 1, 1) = Worksheets("Listes").Cells(Worksheets("Listes").Range("D:D").Find(Worksheets("Suivi").Cells(i, 29)).Row, 3)
Worksheets("Suivi").Cells(NBLigSuivi + 1, 2) = Worksheets("Import").Cells(i, 2)
Worksheets("Suivi").Cells(NBLigSuivi + 1, 3) = Worksheets("Import").Cells(i, 9)
Worksheets("Suivi").Cells(NBLigSuivi + 1, 4) = Worksheets("Import").Cells(i, 22)
Worksheets("Suivi").Cells(NBLigSuivi + 1, 5) = Worksheets("Import").Cells(i, 10)
Worksheets("Suivi").Cells(NBLigSuivi + 1, 6) = Worksheets("Import").Cells(i, 13)
Worksheets("Suivi").Cells(NBLigSuivi + 1, 7) = Worksheets("Import").Cells(i, 19)
Worksheets("Suivi").Cells(NBLigSuivi + 1, 8) = Worksheets("Import").Cells(i, 20)
Worksheets("Suivi").Cells(NBLigSuivi + 1, 9) = Worksheets("Import").Cells(i, 8)
Worksheets("Suivi").Cells(NBLigSuivi + 1, 15) = Worksheets("Import").Cells(i, 18)
NBLigSuivi = NBLigSuivi + 1
Else
j = Worksheets("Inter").Range("A:A").Find(Worksheets("Inter").Cells(i - 1, 2), LookIn:=xlValues).Row + 2
Worksheets("Suivi").Cells(j, 1) = Worksheets("Listes").Cells(Worksheets("Listes").Range("D:D").Find(Worksheets("Suivi").Cells(i, 29)).Row, 3)
Worksheets("Suivi").Cells(j, 2) = Worksheets("Import").Cells(i, 2)
Worksheets("Suivi").Cells(j, 3) = Worksheets("Import").Cells(i, 9)
Worksheets("Suivi").Cells(j, 4) = Worksheets("Import").Cells(i, 22)
Worksheets("Suivi").Cells(j, 5) = Worksheets("Import").Cells(i, 10)
Worksheets("Suivi").Cells(j, 6) = Worksheets("Import").Cells(i, 13)
Worksheets("Suivi").Cells(j, 7) = Worksheets("Import").Cells(i, 19)
Worksheets("Suivi").Cells(j, 8) = Worksheets("Import").Cells(i, 20)
Worksheets("Suivi").Cells(j, 9) = Worksheets("Import").Cells(i, 8)
Worksheets("Suivi").Cells(j, 15) = Worksheets("Import").Cells(i, 18)
End If
Next
Application.ScreenUpdating = True |
Partager