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
|
Dim o, k, l, m, nom2, nom3
For o = 2 To 5600 'il ya 5600 lignes
k = Sheets("Feuil6").Cells(o, 2).Value
nom2 = Sheets("Feuil6").Cells(o, 1).Value
nom3 = Sheets("Feuil6").Cells(o + 1, 1).Value
n = Left(nom2, 15)
n1 = Left(nom3, 15)
If k <> "" Then
Rechligne1 = Sheets("Feuil4").Cells(o, o).Find(nom2).Row
Rechligne = Sheets("Feuil4").Cells(o + 1, o + 1).Find(nom3).Row
Rechcol1 = Sheets("Feuil4").Range("A1:HFK5560").Find(nom2).Column
Rechcol2 = Sheets("Feuil4").Range("A1:HFK5560").Find(nom3).Column
x = Rechligne1
y = Rechligne
Z = Rechcol1
t = Rechcol2
If Sheets("Feuil6").Cells(o + 1, 2).Value = k Then
If Left(nom2, 1) <> Left(nom3, 15) Then
If Left(nom2, 1) < Left(nom3, 15) Then
Sheets("Feuil4").Cells(y, Z).Value = Sheets("Feuil4").Cells(y, Z).Value + 1
Else
Sheets("Feuil4").Cells(x, t).Value = Sheets("Feuil4").Cells(x, t).Value + 1
End If
End If
End If
End If
Next o |
Partager