Bonjour,
J'ai créé un tableau nommé Tablo et je voudrais colorer les lignes en fonction des valeurs positionnées dans la 1ère colonne nommée D.
J'ai essayéMais dès que la condition est réalisée, toute la ligne est colorée et non la ligne limitée au Tablo
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 Sub BouclRows() Dim i As Long i = 1 For Each Row In Range("Tablo [D]") Sheets("Feuil2").ListObjects("Tablo ").ListRows(i).Range.Select With Selection If Range("A" & i).Value = "u" Then Rows(i).Interior.ColorIndex = 4 'Vert brillant If Range("A" & i).Value = "t" Then Rows(i).Interior.ColorIndex = 7 'Rose fluo If Range("A" & i).Value = "R" Then Rows(i).Interior.ColorIndex = 6 'Jaune fluo End With i = i + 1 Next Row End Sub
Merci de bien vouloir m'aider, svp
Partager