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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
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,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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