COULEUR SELON condition

S

serval

Guest
comment traduire dans une macro existante :
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

comment rajouter si cellule vide acun remplissage car avec cette macro si j efface les inscription des cellules elle reste avec la couleur des inscription efface merci
 

Discussions similaires

Réponses
7
Affichages
311

Statistiques des forums

Discussions
312 038
Messages
2 084 822
Membres
102 680
dernier inscrit
naddad