Making rand() update every iteration

incblue

New Member
Joined
Feb 23, 2011
Messages
8
I do not have a spreadsheet as an example.
I will create a new one to illustrate my problem if my explanation is confusing.

When using maximum iteration of 1, the rand() function clearly generates a new value every time you press F9.

However sometimes when I use a maximum iteration of 100, 1,000 or 10,000 it is clear that Excel has just generated one random value, and used this value for all 10,000 calculations instead of generating a new value every time.

Is there a way to force Excel to generate a new value every iteration?
 
Bump
Can somebody try the following:
I would like to see what someone else's results are.
If you set up A1 to D1 like this, with these calculation settings, then I am sure you will see what I mean.
capturewqn.png
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I expect their results are the same as yours. I think the iterative recalculation only applies to cells with circular references, not all the cells in the workbook and not their precedents.
 
Upvote 0
I do not have a spreadsheet as an example.
I will create a new one to illustrate my problem if my explanation is confusing.

When using maximum iteration of 1, the rand() function clearly generates a new value every time you press F9.

However sometimes when I use a maximum iteration of 100, 1,000 or 10,000 it is clear that Excel has just generated one random value, and used this value for all 10,000 calculations instead of generating a new value every time.

Is there a way to force Excel to generate a new value every iteration?


I replaced the simple formula =RAND() with =if(anycondition, RAND(),RAND()) . Excel will recalculate formula every iteration. Don't care the if condition.
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,135
Members
452,890
Latest member
Nikhil Ramesh

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