Ceci est une page optimisée pour les mobiles. Cliquez sur ce texte pour afficher la vraie page.

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
328
Les cookies sont requis pour utiliser ce site. Vous devez les accepter pour continuer à utiliser le site. En savoir plus…