COULEUR SELON condition

S

serval

Guest
avec cette macro tout marche bien
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Select Case UCase(Target) 'UCASE =
Case "H1"
With Selection.Interior
.ColorIndex = 7
.Pattern = xlSolid
End With
Case "H2"
With Selection.Interior
.ColorIndex = 8
.Pattern = xlSolid
End With
Case "H3"
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
Case "H4"
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Case "H5"
With Selection.Interior
.ColorIndex = 9
.Pattern = xlSolid
End With
End Select

mais je suis oblige de cliquer 2 fois dans les cellules pour avoir de la couleur est ce possible que cele ce fasse automatiquement comme dans une mise en forme conditionnel MERCI
 

Discussions similaires

Réponses
7
Affichages
371

Statistiques des forums

Discussions
312 753
Messages
2 091 667
Membres
105 039
dernier inscrit
rouibi