Mirror cells when a change in either cell updates the other

خرید بک لینک

Gary's Student answered this question before and it worked great for only 1 cell per sheet. If I wanted to mirror multiple cells what could I do? I have tried the following and it does not work. I do not get errors but nothing happens. I am new to VBA BTW.

Private Sub Worksheet_Change(ByVal Target As Range)

Dim r1 As Range, r2 As Range
Set r1 = Range("C3:D3")
Set r2 = Sheets("Flight Planning").Range("K1:K2")
If Intersect(Target, r1) Is Nothing Then Exit Sub
Application.EnableEvents = False
    r2.Value = r1.Value
Application.EnableEvents = True

Dim r3 As Range, r4 As Range
Set r3 = Range("E22")
Set r4 = Sheets("Flight Planning").Range("B4")
If Intersect(Target, r3) Is Nothing Then Exit Sub
Application.EnableEvents = False
    r4.Value = r3.Value
Application.EnableEvents = True

Dim r5 As Range, r6 As Range
Set r5 = Range("E24")
Set r6 = Sheets("Flight Planning").Range("C4:D4")
If Intersect(Target, r5) Is Nothing Then Exit Sub
Application.EnableEvents = False
    r6.Value = r5.Value
Application.EnableEvents = True
End Sub

Thanks

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 234 تاريخ: سه شنبه 8 تير 1395 ساعت: 9:59

صفحه بندی