Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cell referencing Michael Excel Worksheet Functions 3 November 4th 07 01:21 PM
Referencing Cell Next To Today's Date Cell Docktondad Excel Discussion (Misc queries) 5 May 16th 07 10:25 PM
Referencing last cell Jean Excel Worksheet Functions 17 January 31st 07 11:13 PM
Referencing to other cell hadoka Excel Discussion (Misc queries) 1 November 27th 06 08:07 AM
referencing the cell above stuhag Excel Discussion (Misc queries) 3 November 25th 05 12:11 PM


All times are GMT +1. The time now is 06:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"