Using Rand ( ) as one of the variables in Data Table

hhuifeng

New Member
Joined
Sep 28, 2011
Messages
1
i have a data table with 2 variables.

one of the variables is generated by using RAND ( ) and added to a fixed # (say, year 1913). The other variable is "Yes" or "No" to a certain question.

When I run the data tables i get very inconsistent results (since RAND ( ) is still generating random varianble inputs, i was not able to detect anything wrong), so i tried copying and pasting the results of RAND ( ). then i got consistent results.

Is it possible that when the Data Table is running, the RAND ( ) is still running and then the inputs are actually different for the other variable "Yes" or "No?"
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hi,
so you want rand to make a number then stay consistant? Rand makes a number based on a seed number (always the same seed and hence the same numbers will always play out eg if 1 is first then 2 and 3 everytime.)

If you use randomize before hand it makes it all random.

do you have some code?
 
Upvote 0

Forum statistics

Threads
1,224,520
Messages
6,179,267
Members
452,902
Latest member
Knuddeluff

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