View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Allllen Allllen is offline
external usenet poster
 
Posts: 341
Default If I remember correctrly .... (Binding to Cells together)

Hi Bill,

Two way reference - I can only see how to do this with some code. But this
is a procedure not a function. You are right that the change event is what
you need.

Here is how to link cell B8 in sheet1 to cell B8 in sheet2.

Code in sheet 1:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$8" Then Sheets("sheet2").Range("B8").Value =
Range("B8").Value
End Sub

Code in sheet 2:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$8" Then Sheets("sheet1").Range("B8").Value =
Range("B8").Value
End Sub

If you don't know where to put this code, you just have to right click on
the tab at the bottom of the screen, choose "View Code", and paste it right
in there. YOu will have to do it once for each sheet.
--
Allllen


"Bill Case" wrote:

Hi;

I read (I think) a couple of weeks ago about how to bind two cells on two
different worksheets in the same workbook, such that when you enter or change
data in either cell the same change is made in the other. I am not talking
about a simple one way reference -- but, a two way reference.

For example, I have a MembersListSheet that includes cells showing positions
and roles in upcoming meetings. I have another worksheet that contains
printable agendas for those upcoming meetings. I have a one way reference
from the MembersListSheet cells that displays the relevent positions and
roles in the PrintableAgendaWorksheet.

I would like to set it up so that last minute changes can be made in the
relevent cells of the PrintableAgendaWorksheet ( and online from our Web site
-- but that is a separate issue) and have those last minute changes reflected
back to the appropriate MembersListSheet cells. I.e. Useing a two-way
reference.

I think I rember reading how to do this simply, but now I can't find the
reference.

If there isn't a specific simple way to do this, I was thinking of writing a
function that would do the same; based on an onchange event. Is this a good
idea or will it be too complex?

Regards Bill