Excel VBA : Boucle For Each, Do While
Fermé
polo_0109
-
29 avril 2010 à 14:11
Bidouilleu_R
Bidouilleu_R
- Messages postés
- 1181
- Date d'inscription
- mardi 27 mai 2008
- Statut
- Membre
- Dernière intervention
- 12 juillet 2012
A voir également:
- For each vba
- Boucle for each vba - Meilleures réponses
- For each while - Meilleures réponses
- Excel VBA : Boucle For Each, Do While - Forum - VB / VBA
- VBA excel For Each trouver élément suivant ✓ - Forum - VB / VBA
- [VBA] boucle for each sur un bouton ✓ - Forum - VB / VBA
- Vba boucle for each ✓ - Forum - VB / VBA
- Next sans for excel vba - Forum - VB / VBA
2 réponses
Bidouilleu_R
29 avril 2010 à 14:27
- Messages postés
- 1181
- Date d'inscription
- mardi 27 mai 2008
- Statut
- Membre
- Dernière intervention
- 12 juillet 2012
29 avril 2010 à 14:27
le do ....loop est inutile
il vaut mieux faire un test if then
Comme ça tu auras du jaune clair
il vaut mieux faire un test if then
Comme ça tu auras du jaune clair
Sub Essai() Dim c As Variant For Each c In Range("E3:EE3") if c.value>14 then c.Offset(1, 0).Interior.ColorIndex = 36 end if Next c End Sub