Private Sub cmdCopierVers_Click()
Dim lgLig As Long
Dim lgDerLig As Long
[B][COLOR="Blue"]If Range("A1").Value = 1 Then
MsgBox "la copie dans le tableau 2 a déjà été faite."
Range("A1").Clear
Exit Sub
End If[/COLOR][/B]
' Tableau 1 : Boucle de la ligne 7 à 10
For lgLig = 7 To 10
' Uniquement le retrait d'espèces
If Range("F" & lgLig).Value = "Retrait Espèces" And Not Range("I" & lgLig).Value = "P" Then ' Dernière ligne libre en colonne AB
lgDerLig = Range("AB" & Cells.Rows.Count).End(xlUp).Row + 1
Range("AB" & lgDerLig).Value = Range("B" & lgLig).Value
Range("AC" & lgDerLig).Value = Range("F" & lgLig).Value
Range("AE" & lgDerLig).Value = Range("G" & lgLig).Value
[B][COLOR="Blue"]Range("A1").Value = 1[/COLOR][/B]
End If
Next lgLig
[B][COLOR="Blue"]If Range("A1").Value = "" Then MsgBox "Pas de copie à faire dans le tableau 2."[/COLOR][/B]
End Sub