Excel – Two Way Link between excel workbooks

microsoft excel

Is it possible in Excel to link two cells together (in different workbooks) so that a change in either is reflected in the other cell?

The one-way linking whereby one cell is a view of the value in the other cell is easy. I'm after a two-way linking so that a user could update either cell and have the value reflected in the other.

Best Answer

Across workbooks is not possible, but across worksheets in the same workbook is:
For this private sub, right click the Excel button and hit view code

Private Sub Workbook_TwoWayMatch(ByVal Sh As Object, ByVal Target As Range) 
    If UCase(Sh.Name) = "sheet1" Or UCase(Sh.Name) = "sheet2" Then 
        If Not Application.Intersect(Target, Range("A1")) Is Nothing Then 
            Application.EnableEvents = False 
            If UCase(Target.Parent.Name) = "SHEET1" Then 
                Sheets("Sheet2").Range("A1") = Target 
            Else 
                Sheets("Sheet1").Range("A1") = Target 
            End If 
            Application.EnableEvents = True 
        End If 
    End If 
End Sub 
Related Question