A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Change value in cell



 
 
Thread Tools Display Modes
  #1  
Old March 8th, 2006, 05:27 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default Change value in cell

I have cells

G2
G4
G13
G14

when I change the value in any of these I would like it to change in all 4
ex. If I change G2 to 65 then G4,G13,G14 will be 65
If I change G4, then the rest will change. and so on. I only need these 4
to be the same.

I was going to do the =G2, but I can't do that. I don't know which cell
they are going to change. They are using this for a cost presentation. I am
leting people use this that have no clue about formulas and will get
frustrated, if it does not work.
Thanks.
  #2  
Old March 8th, 2006, 05:40 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default Change value in cell

'-----------------------------------------------------------------
Private Sub Worksheet_Change(ByVal target As Range)
'-----------------------------------------------------------------
Const WS_RANGE As String = "G2,G4,G13,G14"
Dim sTemp
Dim cell As Range

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(target, Me.Range(WS_RANGE)) Is Nothing Then
sTemp = target.Value
For Each cell In Range(WS_RANGE)
cell.Value = sTemp
Next cell
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Chey" wrote in message
...
I have cells

G2
G4
G13
G14

when I change the value in any of these I would like it to change in all 4
ex. If I change G2 to 65 then G4,G13,G14 will be 65
If I change G4, then the rest will change. and so on. I only need these 4
to be the same.

I was going to do the =G2, but I can't do that. I don't know which cell
they are going to change. They are using this for a cost presentation. I

am
leting people use this that have no clue about formulas and will get
frustrated, if it does not work.
Thanks.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent date/scheduling calc needed jct Worksheet Functions 3 February 24th, 2006 01:36 AM
copying cell names Al General Discussion 3 August 11th, 2005 03:01 PM
Cell Change Color - Need Help alani New Users 1 June 28th, 2005 02:04 PM
Possible Lookup Table Karen Worksheet Functions 5 June 8th, 2005 09:43 PM
Cell references change when entering new data [email protected] New Users 2 May 6th, 2005 07:48 PM


All times are GMT +1. The time now is 12:09 PM.


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