Erreur d'execution 13 (VBA) : aide correction code

Salut à tous,

J'aurais besoin de quelqu'un pour m'aider.

J'ai une formule dont j'ai grand besoin mais qui ne marche pas, je reçois un message d'erreur du genre

erreur d'exécution '13'

Incompatibilité de type.

Voici mon code :

Sub CATEGO()

Dim i As Long

Application.ScreenUpdating = False

For i = 4 To 300

If Cells(i, 5).Value = "CATEGORIEL" Then _

Cells(i, 3).Value = Cells(i, 10).Value * 0.9 * Cells(i, 7).Value / 1.055 And _

Cells(i, 4).Value = Cells(i, 3).Value * Cells(i, 7).Value * _

(Cells(i, 8).Value * (1 + Cells(1, 8).Value)) And _

Cells(i, 11).Value = Cells(i, 4).Value / Cells(i, 3).Value * 100

Next i

End Sub

Merci d'avance à toute personne pouvant m'aider à résoudre ce problème.

Cordialement

bonjour,

sans avoir le fichier et sans savoir ce que tu veux faire, proposition de solution

Sub CATEGO()
Dim i As Long
Application.ScreenUpdating = False
For i = 4 To 300
If Cells(i, 5).Value = "CATEGORIEL" Then 
Cells(i, 3).Value = Cells(i, 10).Value * 0.9 * Cells(i, 7).Value / 1.055
Cells(i, 4).Value = Cells(i, 3).Value * Cells(i, 7).Value * (Cells(i, 8).Value * (1 + Cells(1, 8).Value))
Cells(i, 11).Value = Cells(i, 4).Value / Cells(i, 3).Value * 100
end if
Next i

End Sub

Bonjour,

Tu peux commencer par tester ce code

Sub CATEGO()
Dim i As Long
    Application.ScreenUpdating = False
    For i = 4 To 300
        If Cells(i, 5).Value = "CATEGORIEL" Then
            Cells(i, 3).Value = Cells(i, 10).Value * 0.9 * Cells(i, 7).Value / 1.055
            Cells(i, 4).Value = Cells(i, 3).Value * Cells(i, 7).Value * Cells(i, 8).Value * (1 + Cells(1, 8).Value)
            Cells(i, 11).Value = Cells(i, 4).Value / Cells(i, 3).Value * 100
        End If
    Next i
End Sub

A+

edit : bonjour H2SO4

Merci pour vos réponses.

Ca marche!

Cordialement

Rechercher des sujets similaires à "erreur execution vba aide correction code"