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
292

Statistiques des forums

Discussions
311 733
Messages
2 082 015
Membres
101 867
dernier inscrit
XFPRO