Public Sub CouleurCel()
SansCouleurCel
i = Range("Menu!I15")
With Sheets("livret")
Select Case i
Case 1
For Each cel In .Range("c7:c250")
cel.Interior.ColorIndex = xlNone
Next cel
Case 2 'fond
For Each cel In .Range("c7:c250")
If Left(cel, 1) = "A" Then cel.Interior.ColorIndex = Range("tables!G5")
If Left(cel, 1) = "B" Then cel.Interior.ColorIndex = Range("tables!G4")
If Left(cel, 1) = "C" Then cel.Interior.ColorIndex = Range("tables!G3")
If Left(cel, 1) = "D" Then cel.Interior.ColorIndex = Range("tables!G2")
If cel = "" Then cel.Interior.ColorIndex = xlNone
Next cel
Case 3 'lettre
For Each cel In .Range("c7:c250")
If Left(cel, 1) = "A" Then cel.Font.ColorIndex = Range("tables!G5")
If Left(cel, 1) = "B" Then cel.Font.ColorIndex = Range("tables!G4")
If Left(cel, 1) = "C" Then cel.Font.ColorIndex = Range("tables!G3")
If Left(cel, 1) = "D" Then cel.Font.ColorIndex = Range("tables!G2")
If cel = "" Then cel.Font.ColorIndex = xlAutomatic
Next cel
End Select
End With
End Sub
Public Sub SansCouleurCel()
With Sheets("livret")
For Each cel In .Range("c7:c250")
cel.Interior.ColorIndex = xlNone
cel.Font.ColorIndex = xlAutomatic
Next cel
End With