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
| With Sheets("SUIVTRANS EN COURS")
Derligne = .Range("A" & Rows.Count).End(xlUp).Row
.Range("M2:M" & Derligne).ClearContents
Tablo = .Range("J2", "K" & .Range("K" & .Rows.Count).End(xlUp).Row)
For j = 2 To Derligne
somme = 0
codeP = .Cells(j, "H")
For i = LBound(Tablo, 1) To UBound(Tablo, 1)
If .Cells(j, "J") = Tablo(i, 1) Then
If .Cells(i + 1, "H") <> codeP Then
GoTo pasDeCommentaire
Else
somme = somme + CDbl(Tablo(i, 2))
End If
End If
Next i
'REGULARISATION ECART-TEMPLATE (2)
If somme >= -10 And somme <= 10 And somme <> 0 Then
.Cells(j, 13) = "REGULARISATION ECART-TEMPLATE"
End if
End j |