Help needed on making multiple cells "constant"

derrty6232

New Member
Joined
Nov 4, 2005
Messages
9
Hello, I am new to this message board.

How do I make it so that when i change the value or label of one cell, a number of other cells change to the same value or label? The cells do not contain formulas or functions, just constants. Thanks for any help in advance.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
If you have your value in A1

so in B1 write

=A1

Or did I miss something?

Pekka
:eek: :eek:

BTW. Wellcome to the board. This is the best Excel board where you get answer to all questions.
 
Upvote 0
Actually, I have 3 cells, lets call them A1, A2, and A3. I want to make it so that if I change A1 then A2 and A3 = the value in A1, likewise, if i change A3, I want A1 and A2 = the value in A3, so basically I to be able to change any 1 of the three cells and have the other 2 cells to have the same value.
 
Upvote 0
Here you need VBA.

Are you familiar with that?

Pekka
:eek: :eek:
Anyhow, this need of your seems to be quite special.
Can you explain to us what you are really doing? And what you want to gain with this.
Maybe there is an other solution for your needs.
 
Upvote 0
Thanks for the welcome.
There's nothing really special about what I'm doing, just doing an Information Systems assignment. Hm...VBA eh... not too familiar with this app yet... Thanks for the help anyways. If I find a solution I'll be sure to post it.
 
Upvote 0
<font face=Courier New><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Worksheet_Change(<SPAN style="color:#00007F">ByVal</SPAN> Target <SPAN style="color:#00007F">As</SPAN> Range)
<SPAN style="color:#00007F">If</SPAN> Intersect(Target, [A1:A3]) <SPAN style="color:#00007F">Is</SPAN> <SPAN style="color:#00007F">Nothing</SPAN> <SPAN style="color:#00007F">Then</SPAN> <SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Sub</SPAN> <SPAN style="color:#007F00">' Monitor for changes to only A1:A3</SPAN>
Application.EnableEvents = <SPAN style="color:#00007F">False</SPAN>
Application.ScreenUpdating = <SPAN style="color:#00007F">False</SPAN>
<SPAN style="color:#00007F">Select</SPAN> <SPAN style="color:#00007F">Case</SPAN> Target.Row
    <SPAN style="color:#00007F">Case</SPAN> 1
        [A2] = [A1]: [A3] = [A1]
    <SPAN style="color:#00007F">Case</SPAN> 2
        [A1] = [A2]: [A3] = [A2]
    <SPAN style="color:#00007F">Case</SPAN> 3
        [A1] = [A3]: [A2] = [A3]
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Select</SPAN>
Application.EnableEvents = <SPAN style="color:#00007F">True</SPAN>
Application.ScreenUpdating = <SPAN style="color:#00007F">True</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

When in your workbook, hit Alt+F11 - that'll open the VB Editor.

Look in the left hand pane and find your workbook name, then underneath that the sheet name where your A1/A2/A3 is located.

Click on it so it is selected. Then copy/paste the above code in the big white space in the center/right.

Close out that screen.

Now, any change to A1 or A2 or A3 should be reflected as you wanted.

From now on, when opening your workbook, you will be alerted that there are macros. If you want this code to function you must answer in the affirmative.
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top