VBA Excel: Aide sur erreur For...next
Résolu/Fermé
A voir également:
- Vba next sans for
- Vba range avec variable ✓ - Forum VB / VBA
- Erreur 1004 vba ✓ - Forum VB / VBA
- Vba ouvrir un fichier excel avec chemin ✓ - Forum VB / VBA
- Find vba - Astuces et Solutions
- Download instagram for pc - Télécharger - Divers Communication
2 réponses
Bonjour Anastasia,
Le problème vient du fait que tu n'aies mis qu'un seul End if pour trois If. Le problème ne se pose plus lorsque tu en ajoutes deux de la manière suivante:
Bonne journée!
Le problème vient du fait que tu n'aies mis qu'un seul End if pour trois If. Le problème ne se pose plus lorsque tu en ajoutes deux de la manière suivante:
Sub Coul()
ActiveWorkbook.Worksheets("DTELP").Select
For y = 3 To 57
If Cells(y, 5).Value = 0 Then
Cells(y, 8).Font.ColorIndex = 3
Else
If Cells(y, 5).Value = 1 Then
Cells(y, 8).Font.ColorIndex = 10
Else
If Cells(y, 5).Value = 2 Then
Cells(y, 8).Font.ColorIndex = 45
End If
End If
End If
Next y
End Sub
Bonne journée!
10 juin 2014 à 09:39
Ca fonctionne, merci!
Bonne journée!