VBA Macro to make cell values change to have their SUM always equal 100
I have a series of numbers that I need to always sum to 100. I want a student to be able to change the values of these with a slider and have the macro update the remaining cells to always sum to 100. I have 6 cell see below example:
A: 25
B: 33
C: 22
D: 11
E: 4
F: 5
SUM= 100
*when the student changes A I want it to split the difference across the remaining cells so:
A: 20 (changed from 25)
B: 34
C: 23
D: 12
E: 5
F: 6
SUM= 100
I don't think this should be hard I just don't know how to write the macro part where I get the difference between A(state1) and A(state2)
Thanks!!!!
Recent comments
5 years 41 weeks ago
6 years 27 weeks ago
6 years 39 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 48 weeks ago
7 years 4 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago