Bonjour à tous,
J'ai un soucis de programmation sur le pointage (X) pour avoir mon solde du compte que j'ai créé !
Lorsque je saisis manuellement des X qui deviennent P après la macro, je ne trouve pas mon solde que je dois trouver dans la cellule H1
Merci de votre participation et bonne journée !
J'ai un soucis de programmation sur le pointage (X) pour avoir mon solde du compte que j'ai créé !
Lorsque je saisis manuellement des X qui deviennent P après la macro, je ne trouve pas mon solde que je dois trouver dans la cellule H1
Code:
Sub Pointage_des_X()
Dim I As Long
Application.ScreenUpdating = False
Range("H1").ClearContents
Range("H4") = Range("E1") + Range("F4") - Range("E4")
Range("H4").NumberFormat = "###0.00 ""€"";[Red]-###0.00 ""€"""
For I = 5 To 65536
If Cells(I, 2) = "" Then Exit Sub
If Cells(I, 1) = "X" And Cells(I, 2) <> "" Then
Cells(I, 8) = Cells(I - 1, 8) + Cells(I, 6) - Cells(I, 5)
Cells(I, 8).NumberFormat = "###0.00 ""€"";[Red]-###0.00 ""€"""
Cells(I, 1) = "P"
Range("H1") = Cells(I, 8)
ElseIf Cells(I, 1) = "P" Then
Range("H1") = Cells(I - 1, 8) + Cells(I, 6) - Cells(I, 5)
Range("H1").NumberFormat = "###0.00 ""€"";[Red]-###0.00 ""€"""
End If
Next I
Application.ScreenUpdating = True
End Sub
Merci de votre participation et bonne journée !
Pièces jointes
Dernière édition: