Formula or VBA for Random numbers same sum?

Dettico

New Member
Joined
Sep 18, 2018
Messages
1
Hello everyone.

Does anyone know a set of formulas or Macro which would allow me to do the following?

What I have now is a table in which every row has, for each column, a finite interval of numbers that can be chosen from (like: 1, 5.3, 6.7 BUT NOT 5.4, 6.9....). Keep in mind that these intervals change at each column.
The last column SUMS all the numbers from that row.
Now, my question is:

Is there a way to put a fixed sum at the end of each row and make Excel to randomize the value in each column for that row to give me that final SUM, at the same time not choosing any number outside of the boundaries set for each column?

Thank you in advance!

Codetti
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Google for Excel Solver, I've never used it but I understand it has the ability to produce a specified result from given set of data.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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