Excel linking cells

Hidden999

New Member
Joined
Mar 3, 2019
Messages
18
Hi guys,

I am making a worksheet and have a question regarding linking cells.

What I want to achieve:
Having two cells (on different sheets or not) which contain the same text.
So if I change the text in one cell it also changes in the other cell. Vice versa.
I've tried doing it just like this.

A1 contains formula (=B1)
B1 contains formula (=A1)

But then if you type it overwrites the formula.

Thanks in advance!
 
You need to save the file as an .xlsm file, not an .xlsx file.
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
You're welcome & thanks for the feedback
 
Upvote 0
One question, what is easy if you want only certain cells.
For example A1 in sheet1 is the same as D1 in sheet2?

Also how do you add more cells. Like A1 to D1 and C2 to D2
 
Upvote 0
Something like
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
   Dim Addr As String
   If Target.CountLarge > 1 Then Exit Sub
   If Not Intersect(Target, Range("A1,C2")) Is Nothing Then
      Application.EnableEvents = False
      Select Case Target.Address(0, 0)
         Case "A1"
            Addr = "D1"
         Case "C2"
            Addr = "D2"
      End Select
      Sheets("sheet1").Range(Addr).Value = Target.Value
      Application.EnableEvents = True
   End If
End Sub
This will only work if a single cell is changed.
 
Upvote 0
Also if the cells are not on the same sheet? For example A1 on sheet1 to D3 on sheet2 and F3 on sheet1 to A3 on sheet2?
 
Upvote 0
The code I posted needs to go in Sheet2 & will modify sheet1, you need the same code in sheet1 with the ranges reversed
 
Upvote 0
It's in dutch so i'm not sure what it is in englisch but something about a fault in an object. When I press 'look for fault' it indicates to this line: 'Sheets ("ame") . Range(Addr) .Vaue = Target ...
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
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