ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Generate random numbers (https://www.excelbanter.com/excel-discussion-misc-queries/134880-generate-random-numbers.html)

cawhitaker

Generate random numbers
 
I want to generate 45 random numbers between the numbers 1 and 300. I have
tried using RAND, RND, and a couple others. I can get it to generate one
random number, but I want to generate more than one random number (45).
Please help.

KC Rippstein hotmail com>

Generate random numbers
 
From Excel help:

RANDBETWEEN

Returns a random integer number between the numbers you specify. A new
random integer number is returned every time the worksheet is calculated.

If this function is not available, and returns the #NAME? error, install and
load the Analysis ToolPak add-in.
- On the Tools menu, click Add-Ins.
- In the Add-Ins available list, select the Analysis ToolPak box, and then
click OK.
If necessary, follow the instructions in the setup program.

Syntax

RANDBETWEEN(bottom,top)

Bottom is the smallest integer RANDBETWEEN will return.

Top is the largest integer RANDBETWEEN will return.

Example

Formula Description (Result)
=RANDBETWEEN(1,100) Random number between 1 and 100 (varies)
=RANDBETWEEN(-1,1) Random number between -1 and 1 (varies)


KC
--
Please remember to indicate when the post is answered so others can benefit
from it later.


"cawhitaker" wrote:

I want to generate 45 random numbers between the numbers 1 and 300. I have
tried using RAND, RND, and a couple others. I can get it to generate one
random number, but I want to generate more than one random number (45).
Please help.


James Silverton

Generate random numbers
 
cawhitaker wrote on Wed, 14 Mar 2007 14:20:53 -0700:

c I want to generate 45 random numbers between the numbers 1
c and 300. I have tried using RAND, RND, and a couple others.
c I can get it to generate one random number, but I want to
c generate more than one random number (45). Please help.

What's wrong with RANDBETWEEN even if the Excel random number
generator is not the greatest?

James Silverton
Potomac, Maryland

E-mail, with obvious alterations:
not.jim.silverton.at.comcast.not


ALee

Generate random numbers
 
Kind of late, but for the record.

Here is how I generated 9 random numbers from 0 to 0.1
=RAND()*0.1
This filled a cell with a random number.
Then I filled the column using the + in the lower right corner of the cell
dragging down.
I had 9 random numbers.

RANDBETWEEN(-1,1) gives positive and negative random numbers.



"cawhitaker" wrote:

I want to generate 45 random numbers between the numbers 1 and 300. I have
tried using RAND, RND, and a couple others. I can get it to generate one
random number, but I want to generate more than one random number (45).
Please help.



All times are GMT +1. The time now is 02:45 PM.

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