ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Random number generator (https://www.excelbanter.com/excel-worksheet-functions/8049-random-number-generator.html)

Philippe L. Balmanno

Random number generator
 
Used to determin random scheduling in a week.

I have two columns, the first column contains =INT(RANDBETWEEN(1,7))
and the second converts the out put of the first into a day of the
week.

When I save the sheet and then re enter it, the days are recalculated
and I don't want it to do this until I ask it to.

Is there a way to just copy the value output of the weekday formula
without copying that formula so that I can save this run?

Thanks in Advance,

Phil

hrlngrv - ExcelForums.com

Philippe L. Balmanno wrote...
...
I have two columns, the first column contains

=INT(RANDBETWEEN(1,7))
and the second converts the out put of the first into a day of the

week.

When I save the sheet and then re enter it, the days are

recalculated
and I don't want it to do this until I ask it to.

Is there a way to just copy the value output of the weekday

formula
without copying that formula so that I can save this run?


You'd need to use VBA. If by 're-enter' you mean open the file in a
subsequent Excel session, then I believe you'd be better off using a
macro to fill the cells containing this formula with random integers
between 1 and 7.
---------
www.coffeecozy.com

Use your Bodum and give up cold coffee for good!

Jerry W. Lewis

Use 3 columns. Copy from the =INT(RANDBETWEEN(1,7)) column and
Edit|Paste Special|Values into the new column. Your original second
column conversion formulas should be rewritten to refer to the new
static column instead of the original live formula column. To update
formulas, repeat the Copy/Paste operation.

Jerry

Philippe L. Balmanno wrote:

Used to determin random scheduling in a week.

I have two columns, the first column contains =INT(RANDBETWEEN(1,7))
and the second converts the out put of the first into a day of the
week.

When I save the sheet and then re enter it, the days are recalculated
and I don't want it to do this until I ask it to.

Is there a way to just copy the value output of the weekday formula
without copying that formula so that I can save this run?

Thanks in Advance,



Biff

Just to add some info -

You don't need the INT() function. It's doing nothing.
Well, nothing useful. RANDBETWEEN will only return
integers.(unless this has been changed in XL 2003 and up ?)

You can enter decimal values as arguments but the decimal
is ignored.

Biff

-----Original Message-----
Used to determin random scheduling in a week.

I have two columns, the first column contains =INT

(RANDBETWEEN(1,7))
and the second converts the out put of the first into a

day of the
week.

When I save the sheet and then re enter it, the days are

recalculated
and I don't want it to do this until I ask it to.

Is there a way to just copy the value output of the

weekday formula
without copying that formula so that I can save this run?

Thanks in Advance,

Phil
.


Bernd Plumhoff

Hi Philippe,

Are you sure that you really want possibly repeated values
for random scheduling? If not, enter the UniqRandInt()
from http://www.sulprobil.com/html/uniqrandint.html and
delete the line Application.volatile.

If you select 7 adjacent cells, enter =UniqRandInt(7) with
CTRL+SHIFT+ENTER (array formula) these values will stay
until you edit (and "fire" with CTRL+SHIFT+ENTER) these
cells again.

Regards,
Bernd


All times are GMT +1. The time now is 06:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com