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 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago