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
| Dim A As Long
A = 2
'Boucle sur toutes les lignes
Do Until IsEmpty(Cells(A, 1))
'Si Nb Révision > 1
If Cells(A, 3) > 1 Then
'Cas Première révision
If Cells(A, 1) <> Cells(A - 1, 1) Then
'On ne Remplit que la Révision "Next"
If Asc(Cells(A, 2)) < 90 Then Cells(A, 5) = Chr(Asc(Cells(A, 2)) + 1)
'N-ième Révision
Else
'Si Lettre Sup à 'A' alors Remplissage Révision Prev
If Asc(Cells(A, 2)) > 65 Then Cells(A, 4) = Chr(Asc(Cells(A, 2)) - 1)
'Si cette Révision n'est pas la Dernière du Doc Concerné
If Cells(A, 1) = Cells(A + 1, 1) Then
'Si Lettre Inf à 'Z', alors remplissage Next
If Asc(Cells(A, 2)) < 90 Then Cells(A, 5) = Chr(Asc(Cells(A, 2)) + 1)
End If
End If
End If
A = A + 1
Loop
End Sub |
Partager