Link Cells to Change Cell Value from Many Cells

KrisKiel

New Member
Joined
Feb 16, 2019
Messages
28
I don't actually know how to word this question. I'm not looking to simply link cells together with an = or similar function.

Is there a way to set up cells so that if I change the value in any of those cells, they all change? Ideally, they will link across sheets.

Example: A1, B2, and C3 are linked in this way.
So if A1 has '6' entered, B2 and C3 will also display 6. Then if I change B2 to 9, A1 and C20 also change to 9.

I'm guessing it will have to be a macro instead of a formula.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Try placing the following sub in your worksheet's code (not in a regular module):
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Select Case Target.Address(0, 0)
        Case "A1", "B2", "C3"
            Application.EnableEvents = False
            Range("A1,B2,C3") = Target.Value
            Application.EnableEvents = True
    End Select
End Sub
 
Last edited:
Upvote 0
Thought I could enter the Sheet name + specific cell in place of those cells - quickly found out it is not that simple. How would I get those cells linked like that if they're all on different sheets (using the hidden sheet name)?
 
Upvote 0
Try placing the following sub in ThisWorkbook code (not in a regular module):
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Source As Range)
    Application.EnableEvents = False
    Select Case Sh.Name
        Case "Sheet1"
            If Source.Address(0, 0) = "A1" Then
                Sheets("Sheet2").Range("B2") = Source.Value
                Sheets("Sheet3").Range("C3") = Source.Value
            End If
        Case "Sheet2"
             If Source.Address(0, 0) = "B2" Then
                Sheets("Sheet1").Range("A1") = Source.Value
                Sheets("Sheet3").Range("C3") = Source.Value
            End If
       Case "Sheet3"
             If Source.Address(0, 0) = "C3" Then
                Sheets("Sheet1").Range("A1") = Source.Value
                Sheets("Sheet2").Range("B2") = Source.Value
            End If
    End Select
    Application.EnableEvents = True
End Sub
 
Upvote 0
So that works if the sheets have those Names but not if the Names are changed (which I'm expecting to happen regularly). What about for the sheets' CodeName ?
 
Upvote 0
Here is a sub that uses codenames:
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Source As Range)
    Application.EnableEvents = False
    Select Case Sh.CodeName
        Case "Sheet1"
            If Source.Address(0, 0) = "A1" Then
                Sheet2.Range("B2") = Source.Value
                Sheet3.Range("C3") = Source.Value
            End If
        Case "Sheet2"
            If Source.Address(0, 0) = "B2" Then
                Sheet1.Range("A1") = Source.Value
                Sheet3.Range("C3") = Source.Value
            End If
       Case "Sheet3"
            If Source.Address(0, 0) = "C3" Then
                Sheet1.Range("A1") = Source.Value
                Sheet2.Range("B2") = Source.Value
            End If
    End Select
    Application.EnableEvents = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top