Random number generator

  • Thread starter Philippe L. Balmanno
  • Start date
P

Philippe L. Balmanno

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
 
H

hrlngrv - ExcelForums.com

Philippe L. Balmanno wrote..
..
I have two columns, the first column contain =INT(RANDBETWEEN(1,7)
and the second converts the out put of the first into a day of th week

When I save the sheet and then re enter it, the days ar recalculate
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 weekda formul
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
subsequent Excel session, then I believe you'd be better off using
macro to fill the cells containing this formula with random integer
between 1 and 7
 
J

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
 
B

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
 
B

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top