Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Referencing
need to create a code that will allow me input information into cell 'a1' of worksheet 1, then that information will show in cell 'a1' of worksheet 1 and in cell 'b2' of worksheet 3. then I need to use the same or a similar code in cell 'b2' of worksheet 3 so that it will show any information that I put in it back to cell 'a1' of worksheet 1. I want to do this so that I can update either worksheet and the information will be current on both worksheets. please provide complete code. At a total loss in need of major help. -- oberon.black ------------------------------------------------------------------------ oberon.black's Profile: http://www.excelforum.com/member.php...o&userid=26732 View this thread: http://www.excelforum.com/showthread...hreadid=481903 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Referencing
in the code module of sheet1
Private Sub Worksheet_Change(ByVal Target As Range) On Error goto ErrHandler if Target.Address = "$A$1" then application.EnableEvents = False worksheets("sheet3").Range("b2").Value = Target.Value end if ErrHandler: Application.EnableEvents = True End Sub In the code module of Worksheet 3 put in code: Private Sub Worksheet_Change(ByVal Target As Range) On Error goto ErrHandler if Target.Address = "$B$2" then application.EnableEvents = False worksheets("Sheet1").Range("A1").Value = Target.Value end if ErrHandler: Application.EnableEvents = True End Sub -- Regards, Tom Ogilvy "oberon.black" wrote in message news:oberon.black.1xxhym_1131034225.2117@excelforu m-nospam.com... need to create a code that will allow me input information into cell 'a1' of worksheet 1, then that information will show in cell 'a1' of worksheet 1 and in cell 'b2' of worksheet 3. then I need to use the same or a similar code in cell 'b2' of worksheet 3 so that it will show any information that I put in it back to cell 'a1' of worksheet 1. I want to do this so that I can update either worksheet and the information will be current on both worksheets. please provide complete code. At a total loss in need of major help. -- oberon.black ------------------------------------------------------------------------ oberon.black's Profile: http://www.excelforum.com/member.php...o&userid=26732 View this thread: http://www.excelforum.com/showthread...hreadid=481903 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Referencing
Great!! code works great but why do I have to hit enter twice in the cell. I input the information then press enter then I have to go back up to the cell and press enter again. Please explain to me how the code works? -- oberon.black ------------------------------------------------------------------------ oberon.black's Profile: http://www.excelforum.com/member.php...o&userid=26732 View this thread: http://www.excelforum.com/showthread...hreadid=481903 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Referencing
Works fine for me. Possibly you have other code running which is causing
this problem. How does it work. When your write in A1 of Sheet1, it duplicates that value in B2 of sheet3. When you write in B2 of Sheet3, it duplicates that value in A1 of sheet1. when it does it, it disables events so you don't get recursive calls. -- Regards, Tom Ogilvy "oberon.black" wrote in message news:oberon.black.1xxymo_1131055813.8577@excelforu m-nospam.com... Great!! code works great but why do I have to hit enter twice in the cell. I input the information then press enter then I have to go back up to the cell and press enter again. Please explain to me how the code works? -- oberon.black ------------------------------------------------------------------------ oberon.black's Profile: http://www.excelforum.com/member.php...o&userid=26732 View this thread: http://www.excelforum.com/showthread...hreadid=481903 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
cell referencing | Excel Worksheet Functions | |||
Referencing Cell Next To Today's Date Cell | Excel Discussion (Misc queries) | |||
Referencing last cell | Excel Worksheet Functions | |||
Referencing to other cell | Excel Discussion (Misc queries) | |||
referencing the cell above | Excel Discussion (Misc queries) |