Mirroring columns to two different sheets

Status
Not open for further replies.

gomgom2

New Member
Joined
Jan 12, 2018
Messages
7
Hi guys.. my very first post to this site

What I am trying to do here is making a two way input range in two different sheets

That is, if I put anything in "A:A" Column(or specific range) in sheet1, it will appear on sheet2 "C:C" column(or specific range). Also, if I revise it on Sheet2 range, the changes will be automatically applied to the range in sheet1.

Hopefully I am making sense here.

I have tired to learn it on my own.. but stuck


For Sheet1
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim r1 As Range, r2 As Range
    Set r1 = Sheet1.Range("Range1")
    Set r2 = Sheet2.Range("Range2")
    If Intersect(Target, r1) Is Nothing Then Exit Sub
        
    '    Range.(Target.Address).Value
    
        r2.Value = r1.Value
    
End Sub

For Sheet2
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim r1 As Range, r2 As Range
    Dim c As Range
    Set r1 = Sheet2.Range("Range2")
    Set r2 = Sheet1.Range("Range1")


    If Intersect(Target, r1) Is Nothing Then Exit Sub
        If r2.Value <> r1.Cells.Value Then
        r2.Value = r1.Value
    End If
End Sub

Thank you in advance for everything.
 

Some videos you may like

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
50,807
Office Version
  1. 365
Platform
  1. Windows
Duplicate https://www.mrexcel.com/forum/excel...columns-two-different-sheets.html#post4985539

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread. Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).

Note that sometimes posts from new users require Moderator approval before you can see them on the public forums. When this happens, you should see a message to that effect when you try to post it. Please be patient and do not attempt to post the question again.
 
Status
Not open for further replies.

Watch MrExcel Video

Forum statistics

Threads
1,118,662
Messages
5,573,484
Members
412,533
Latest member
Pejter
Top