need help using "RANDBETWEEN" in excel

G

glenn

In using this function, I'm entering values as decimals (ie, I'm looking for
a random number between 1.35 and 1.65. When I do this I get a result of 2.
That's obviously not a number between 1.35 and 1.65. What am I doing wrong?
 
J

JoeU2004

glenn said:
In using this function, I'm entering values as decimals
(ie, I'm looking for a random number between 1.35 and
1.65. When I do this I get a result of 2. That's obviously
not a number between 1.35 and 1.65. What am I doing
wrong?

"Obviously" impossible to say, since you neglect to show us exactly the
formula you are using and how the cells are formatted. (Klunk!)

The solution might be as simple as changing the cell format to Number with 2
decimal places.

Do that anyway. But also, you might be sure that you are using the
following formula:

=RANDBETWEEN(135,165) / 100

or something like that.
 
A

Amish

You should consider checking Help (especially for functions) next
time. Help indicates that the numbers must be integers, which explains
your invalid output.

RANDBETWEEN(bottom,top)
Bottom is the smallest integer RANDBETWEEN will return.
Top is the largest integer RANDBETWEEN will return.

Also, using More Functions (AKA Paste Function and Function Wizard)
will walk through arguments, define the properties, and show you the
result before you finish.
 
D

David Biddulph

My guess is that what you are doing wrong is not reading the Excel help for
the function which you are trying to use.

It says (inter alia):
"Returns a random integer number between the numbers you specify. A new
random integer number is returned every time the worksheet is calculated.

Syntax
RANDBETWEEN(bottom,top)

Bottom is the smallest integer RANDBETWEEN will return.

Top is the largest integer RANDBETWEEN will return."

If you are hoping to get an non-integer number as an output from
RANDBETWEEN, you'll be out of luck. Other folk have suggested how to get
round this problem.
 

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