Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
" Wonderer" wrote
I need to know how to have two cells contain the same information, on the same sheet, so that when I change on cell, the other will reflect that change. How do I do that? If you put in say, F1: =IF(A1="","",A1) F1 will reflect the input in A1. If A1 is cleared, F1 will display a blank: "" -- Rgds Max xl 97 --- GMT+8, 1° 22' N 103° 45' E xdemechanik <atyahoo<dotcom ---- |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Wondereer is looking for a change in EITHER cell getting reflected in the
other cell. In other words, there can be no dependencies other than what VBA imposes through code. Option Explicit 'Be Sure You Have Defined The Range FirstRef and 'SecondRef appropriately Private Sub Worksheet_Change(ByVal Target As Range) 'Code to make changes in one reference range get 'automatically made in another, bi-directionally Static IgnoreMyChange As Boolean If IgnoreMyChange Then IgnoreMyChange = False Exit Sub End If If Replace$(Target.Address, "$", "") = _ Replace$(Range("firstref").Address, "$", "") Then 'Target was firstref, set secondref IgnoreMyChange = True Range("SecondRef").Value = Range("FirstRef").Value IgnoreMyChange = False Exit Sub End If If Replace$(Target.Address, "$", "") = _ Replace$(Range("SecondRef").Address, "$", "") Then 'Target was firstref, set secondref IgnoreMyChange = True Range("FirstRef").Value = Range("Secondref").Value IgnoreMyChange = False Exit Sub End If End Sub "Max" wrote in message ... " Wonderer" wrote I need to know how to have two cells contain the same information, on the same sheet, so that when I change on cell, the other will reflect that change. How do I do that? If you put in say, F1: =IF(A1="","",A1) F1 will reflect the input in A1. If A1 is cleared, F1 will display a blank: "" -- Rgds Max xl 97 --- GMT+8, 1° 22' N 103° 45' E xdemechanik <atyahoo<dotcom ---- |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
one of my comment lines repeats -
2nd instance of ''Target was firstref, set secondref' should say 'Target was SecondRef, set FirstRef Sorry "William Benson" wrote in message ... Wondereer is looking for a change in EITHER cell getting reflected in the other cell. In other words, there can be no dependencies other than what VBA imposes through code. Option Explicit 'Be Sure You Have Defined The Range FirstRef and 'SecondRef appropriately Private Sub Worksheet_Change(ByVal Target As Range) 'Code to make changes in one reference range get 'automatically made in another, bi-directionally Static IgnoreMyChange As Boolean If IgnoreMyChange Then IgnoreMyChange = False Exit Sub End If If Replace$(Target.Address, "$", "") = _ Replace$(Range("firstref").Address, "$", "") Then 'Target was firstref, set secondref IgnoreMyChange = True Range("SecondRef").Value = Range("FirstRef").Value IgnoreMyChange = False Exit Sub End If If Replace$(Target.Address, "$", "") = _ Replace$(Range("SecondRef").Address, "$", "") Then 'Target was firstref, set secondref IgnoreMyChange = True Range("FirstRef").Value = Range("Secondref").Value IgnoreMyChange = False Exit Sub End If End Sub "Max" wrote in message ... " Wonderer" wrote I need to know how to have two cells contain the same information, on the same sheet, so that when I change on cell, the other will reflect that change. How do I do that? If you put in say, F1: =IF(A1="","",A1) F1 will reflect the input in A1. If A1 is cleared, F1 will display a blank: "" -- Rgds Max xl 97 --- GMT+8, 1° 22' N 103° 45' E xdemechanik <atyahoo<dotcom ---- |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My apologies for the mis-read.
-- Rgds Max xl 97 --- GMT+8, 1° 22' N 103° 45' E xdemechanik <atyahoo<dotcom ---- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Duplication | Excel Worksheet Functions | |||
Duplication | Excel Discussion (Misc queries) | |||
Duplication | Excel Discussion (Misc queries) | |||
How-to Prevent Value Duplication | Excel Discussion (Misc queries) | |||
Data duplication | Excel Programming |