Metaripley
Board Regular
- Joined
- Dec 31, 2014
- Messages
- 93
Hi!
Ive got a code running in my sheets codes where in Sheet 1, sheet 2 and sheet 3 have a cell that when you change 1 the other 2 also change.
Now I want to ad a second cell on each sheet that does the same.
But I cant get it to work.
This is the working code for the first cell.
Now I want to add cell C3 on "Parameters Production" and C2 on "TS - VS".
I already tried adding a complete new Sub below the working one and to add another Dim Range within the working one.
Ive got a code running in my sheets codes where in Sheet 1, sheet 2 and sheet 3 have a cell that when you change 1 the other 2 also change.
Now I want to ad a second cell on each sheet that does the same.
But I cant get it to work.
This is the working code for the first cell.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
Application.EnableEvents = False
' The variable KeyCells contains the cells that will
' cause an alert when they are changed.
Set KeyCells = Range("C2")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
' Display a message when one of the designated cells has been
' changed.
Worksheets("TS - VS").Range("B1").Value = KeyCells.Value
Worksheets("Isolated HS - HSS").Range("B1").Value = KeyCells.Value
Worksheets("Parameters Production").Range("C2").Value = KeyCells.Value
End If
Application.EnableEvents = True
End Sub
Now I want to add cell C3 on "Parameters Production" and C2 on "TS - VS".
I already tried adding a complete new Sub below the working one and to add another Dim Range within the working one.