Re : Problème d'éxécution macro
Hello ascarter,
En fait tu as écrit ceci :
If Cells(i, 2) = "" And Cells(i, 1).Interior.ColorIndex = 3 Then
Cells(i, 5) = Cells(i, 1)
Cells(i, 5).Interior.ColorIndex = Cells(i, 1).Interior.ColorIndex
Else
Cells(i, 5) = ""
Cells(i, 5).Interior.ColorIndex = 2
End If
'demande client
If Cells(i, 4) = 1 Then
Cells(i, 5) = Cells(i, 3)
Cells(i, 5).Interior.ColorIndex = Cells(i, 3).Interior.ColorIndex
Else
Cells(i, 5) = ""
Cells(i, 5).Interior.ColorIndex = 2
End If
Dans ton deuxième paragraphe, tout ce qui se trouve sous Else sera exécuté si cela ne répond pas aux conditions du "if". Autrement dit, il va écraser les modifications effectuées dans ton premier paragraphe. Si tu enlèves le "else" de ton deuxième paragraphe, les deux devront s'exécuter sans souci !
Edit : bonjour Robert