ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Help (https://www.excelbanter.com/excel-worksheet-functions/239998-help.html)

b46ygurl

Help
 
Is it possible to link two cells (that has the same information) and when you
update one it automatically updates the other?

vijay

Help
 
Suppose you have information in cell A1. Put this formula in other cell where
u want to update automatically. If the other cell is in other worksheet then
give the reference of sheet name also.
=IF(A1="","",A1)

Vijay


Sam Wilson

Help
 
It's easy if you always update one cell and want the other to change, Vijay's
answer does this for you. If you want to be able to change either cell and
have the other update it's trickier.

You'd need to use VB and have a worksheet change event in the sheet. Press
Alt + F11 to get into the VB editor - find the sheet with the cells on it in
the project window & right-click the sheet then choose view code. Paste this
into the code window:

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False

If Not Intersect(Target, Range("A1")) Is Nothing Then
Range("B1").Value = Range("a1").Value
End If

If Not Intersect(Target, Range("B1")) Is Nothing Then
Range("A1").Value = Range("B1").Value
End If

Application.EnableEvents = True

End Sub

If your linked cells are in two different sheets then the principal is the
same but you need to have a worksheet_change event in each sheet and split
the above into two.



"b46ygurl" wrote:

Is it possible to link two cells (that has the same information) and when you
update one it automatically updates the other?



All times are GMT +1. The time now is 07:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com