Bonjour à tous
Je vous présente ma macro
Sub couleurRH()
Application.ScreenUpdating = False
Dim c As Range
For Each c In Range("A1:CS36")
c.Select
Select Case c
Case Is = "RH"
Selection.Interior.ColorIndex = 8
Selection.Font.ColorIndex = 8
Case Is <> "RH"
Selection.Interior.ColorIndex = 0
Selection.Font.ColorIndex = 0
End Select
Next
Application.ScreenUpdating = True
End Sub
Ma question est simple. Je voudrais savoir s'il est possible de remplacer la selection ("A1:CS36") par une selection faite à la souris sur la feuille de calcul.
Merci d'avance pour votre aide.
Je vous présente ma macro
Sub couleurRH()
Application.ScreenUpdating = False
Dim c As Range
For Each c In Range("A1:CS36")
c.Select
Select Case c
Case Is = "RH"
Selection.Interior.ColorIndex = 8
Selection.Font.ColorIndex = 8
Case Is <> "RH"
Selection.Interior.ColorIndex = 0
Selection.Font.ColorIndex = 0
End Select
Next
Application.ScreenUpdating = True
End Sub
Ma question est simple. Je voudrais savoir s'il est possible de remplacer la selection ("A1:CS36") par une selection faite à la souris sur la feuille de calcul.
Merci d'avance pour votre aide.