1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Dim A As Integer ' ligne à lire
Dim I As Integer ' ligne de destination
A = 8 'initialisation
I = 14 'initialisation
Do While Cells(I, 1) <> "" 'on boucle tant qu'il y a du monde dana la cellule
'Ensuite on copie cellule par cellule
Cells(A, 1) = Cells(I, 1)
If Left(Cells(I - 2, 3), 3) = "Mme" Then
Cells(A, 2) = "Mme"
Cells(A, 3) = Right(Cells(I, 2), Len(Cells(I, 2)) - 4)
Else
Cells(A, 2) = "M."
Cells(A, 3) = Right(Cells(I, 2), Len(Cells(I, 2)) - 3)
End If
'et ainsi de suite
A = A + 1
I = I + 5
Loop |
Partager