1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Sub Couleur()
Dim iColumn As Integer
Dim iRow As Integer
For iRow = 20 To 138 'lignes 20 à 138 (à adapter)
For iColumn = 27 To 393 'colonnes AA(27) à ACD(393) (à adapter)
If Cells(iRow, iColumn).Value = "Q" Then
Cells(iRow, iColumn).Font.Color = RGB(0, 0, 0) 'couleur à adapter
Cells(iRow, iColumn).Interior.Color = RGB(255, 0, 255) 'couleur à adapter
End If
If Cells(iRow, iColumn).Value = "k" Then
Cells(iRow, iColumn).Font.Color = RGB(0, 0, 0) 'couleur à adapter
Cells(iRow, iColumn).Interior.Color = RGB(151, 255, 151) 'couleur à adapter
End If
Next iColumn
Next iRow
End Sub |
Partager