How can i add more sheets and ranges within the same and following VBA. For the record: This code results in having the same text and background color in a dropdown list as it is in the original list.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Target.Value = "" Then Exit Sub
If Not Intersect(Target, Range("B2:B32")) Is Nothing Then
With Target
.Interior.Color = Sheets("Maandoverzicht ploeg 2").Range("C11:c40").Find(Target).Interior.Color
.Font.Color = Sheets("Maandoverzicht ploeg 2").Range("C11:c40").Find(Target).Font.Color
.Font.Bold = Sheets("Maandoverzicht ploeg 2").Range("C11:c40").Find(Target).Font.Bold
End With
End If
End Sub
thanks in advance
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Target.Value = "" Then Exit Sub
If Not Intersect(Target, Range("B2:B32")) Is Nothing Then
With Target
.Interior.Color = Sheets("Maandoverzicht ploeg 2").Range("C11:c40").Find(Target).Interior.Color
.Font.Color = Sheets("Maandoverzicht ploeg 2").Range("C11:c40").Find(Target).Font.Color
.Font.Bold = Sheets("Maandoverzicht ploeg 2").Range("C11:c40").Find(Target).Font.Bold
End With
End If
End Sub
thanks in advance