Bonjour le forum
Voila le code ci-dessous met les cellules de la colonne B en couleur quand elle sont identique au valeur de la colonne IU2: IU16 mais le traitement n'est pas très rapide. Y aurait-il un moyen plus simple et surtout plus rapide.
Merci
Sub ColorieCelluleJoursFeries()
Application.ScreenUpdating = False
Range("b2:b10000").Select
For Each Cell In Selection
If Cell.Value = Range("iu2") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu3") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu4") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu5") Then
Cell.Interior.ColorIndex = 6 End If
If Cell.Value = Range("iu6") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu7") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu8") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu9") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu10") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu11") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu12") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu13") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu14") Then
Cell.Interior.ColorIndex = 6
End If
'If Cell.Value = Range("iu15") Then
'Cell.Interior.ColorIndex = 6
'End If
'If Cell.Value = Range("iu116") Then
'Cell.Interior.ColorIndex = 6
'End If
Next
End Sub
Voila le code ci-dessous met les cellules de la colonne B en couleur quand elle sont identique au valeur de la colonne IU2: IU16 mais le traitement n'est pas très rapide. Y aurait-il un moyen plus simple et surtout plus rapide.
Merci
Sub ColorieCelluleJoursFeries()
Application.ScreenUpdating = False
Range("b2:b10000").Select
For Each Cell In Selection
If Cell.Value = Range("iu2") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu3") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu4") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu5") Then
Cell.Interior.ColorIndex = 6 End If
If Cell.Value = Range("iu6") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu7") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu8") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu9") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu10") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu11") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu12") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu13") Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = Range("iu14") Then
Cell.Interior.ColorIndex = 6
End If
'If Cell.Value = Range("iu15") Then
'Cell.Interior.ColorIndex = 6
'End If
'If Cell.Value = Range("iu116") Then
'Cell.Interior.ColorIndex = 6
'End If
Next
End Sub