Problem:
The following code works great as long as a user enters data manually into (1) cell at a time. If data is copied from multiple cells, and copied to multiple watch cells, the code does not work.
Any ideas?
Thanks,
Dan[vba]Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim rngtest As Range
Set rngtest = Range("B8:B13,F8:F11,F13:F15,B54:B57")
If Not Application.Intersect(Target, rngtest) Is Nothing Then
ActiveSheet.Unprotect
With Target
If .Value = Worksheets("Check-Output Charts").Range(.Address) Then
.Font.ColorIndex = 5
.Interior.ColorIndex = xlColorIndexNone
.Interior.Pattern = xlPatternNone
Else
.Font.ColorIndex = 2
.Interior.ColorIndex = 3
.Interior.Pattern = xlSolid
Sheets("working data").Select
ActiveSheet.Unprotect
Sheets("working data").Range("A3:A6").Font.ColorIndex = 2
With Sheets("working data").Range("A3:A6").Interior
.ColorIndex = 3
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("output charts").Select
End If
End With
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End If
End Sub[/vba]