1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Intersect(Target, [$D$4:$GE$39]) Is Nothing Then Exit Sub
For Each Cel In Target
Set Cel_R = Sheets("Feuil1").[$B$2:$B$31].Find(Cel, LookIn:=xlValues, LookAt:=xlWhole)
If Cel_R Is Nothing Then
Cel.Interior.ColorIndex = xlNone
Else
Cel.Interior.ColorIndex = Cel_R.Interior.ColorIndex
Cel.Font.ColorIndex = Cel_R.Font.ColorIndex
Cel.Font.Bold = Cel_R.Font.Bold
with worksheets("feuille").range(Cel.address)
.Interior.ColorIndex = Cel_R.Interior.ColorIndex
.Font.ColorIndex = Cel_R.Font.ColorIndex
.Font.Bold = Cel_R.Font.Bold
End With
End If
Next Cel
End Sub |