Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a Random Number Formula Please

Status
Not open for further replies.

Bobdogn

IS-IT--Management
Apr 5, 2002
2
US
I am still working on this so I I get an answer, I will post it.

I need a Random number between .639999999 and .64999999999

I get close but never quite get the desired result. I need a value I can use with other formulas in my report to calculate an estimated cost. Sales * Random nember = Est Cost.

Any Clues?
 
The Rnd() function returns a random number between 0 and 1, but I do not know how to make it between .6399999 adn .6499999.

I suppose you could write a loop from 1 to 1,000,000 that ends if the random number is between those 2 values. Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Come on, dgillz -- you should have seen this:

.6300000 + (rnd() * .01)

Bobdogn, check CR Help on the rnd() function and use a seed if you don't want the same value every time.
 
The previous formula only gives me .6300000 to .63999999

I would like to try to have the ability to change the lower and upper limits incase I need to adjust sales costs.

Thanks for any and all help.
 
Rogar,

you can tell its after 4pm Friday!

Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
You can make the limits parameters with default values of .6399999 and .6499999. Then your formula would be:

{?ParmLow} + (rnd() * ({?ParmHigh} - {?ParmLow}))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top