1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| 'Restitution des données
Windows(F1).Activate
For i = 1 To NbFeuilDep
Debut:
On Error Resume Next
If Left(FeuilDep(i), 4) = "INFO" Then GoTo Suivant
For j = 1 To NbLig(i)
If N°Comm(i, j) = "" Then GoTo Suivant
Set c = Sheets(FeuilDep(i)).Columns("A").Find(N°Comm(i, j), LookIn:=xlValues)
If Err.Number = 0 Then
If Not c Is Nothing Then
Dec = 1
Do While c.Offset(0, Dec + 1) <> ""
Dec = Dec + 1
Loop
c.Offset(0, Dec + 1) = Abs(Montant(i, j))
Else
Cells([A100000].End(xlUp).Row + 1, 1) = N°Comm(i, j)
Cells([A100000].End(xlUp).Row, 2) = NomComm(i, j)
Cells([A100000].End(xlUp).Row, 3) = Abs(Montant(i, j))
End If
Else
GoTo CreerFeuille
End If |
Partager