Create 3 Drop-Down Lists which Sum to Specific Value?

#VALUE

New Member
Joined
Mar 16, 2011
Messages
2
Hi all,

I have an excel question which I've been scratching my head about...

I've had a few attempts at solving this from butchering various bits of VBA I've found, but although it works (still with a few bugs to be ironed out), I'm confident there's a better way of doing this.

So, here goes:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Attribute 1[/TD]
[TD][Yes/No][/TD]
[TD][Total_Count][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][Value_1][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][Value_2][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][Value_3][/TD]
[/TR]
</tbody>[/TABLE]

1) "Attribute 1" is just plain text; for example "Split of Total figures"
2) "Yes/no" is an enabling field using a static Yes/No data validation list
3) If you set "Yes/No" to "Yes", "Total_Count" field should be open for population (bonus points if this cell is locked if a user chooses "No")
4) Once "Total_Count" is populated with N, "Value_1", "Value_2" and "Value_3" are populated with drop down lists which display "1-N" as available options. When all of these cells are populated, they should sum to the value "Total_Count"
5) If I populate "Yes", and "Total_Count" with 20, then imagine I pick "Value_2" and set it to "10" from the dropdown list - I would like it if the dropdown lists in "Value_1" and "Value_2" contracted so that they only displayed the numbers "1-10", rather than "1-20"...
6) Finally, if I change the "Total_Count" to empty/zero, I'd like the contents of Value_1, Value_2 and Value_3 to be cleared. If I change the "Yes/No" to "No", I'd like it if the "Total_Count" was cleared automatically (as well as the values below it).


I'd be grateful for any help toward solving this!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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