# formula help!

#### JamiePasley

##### New Member
So I have been doing some simulations and using the rand() feature. The problem I am having now is I need to make a formula that generates a random number between 10500 and 30000 in increments of 250 (thats what is throwing me). Any help would be greatly appreciated!

### Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

#### barry houdini

##### MrExcel MVP
Hello Jaime,

This formula will generate such a number

=INT(RAND()*79+42)*250

#### JamiePasley

##### New Member
Thank you so much! I am so glad I found this board. Another question I have is I am having a really hard time with probabilities right now I am running a sumulation of a business situation where I am generating random numbers for the two bids and I need the probability that one will be lower than the other. Any suggestions on this?
Thanks so much

#### barry houdini

##### MrExcel MVP
I presume the random numbers are generated differently, otherwise the probability of one being greater than the other would be simply 50%

How are the random numbers generated?

#### JamiePasley

##### New Member
the first being generated is using the formula =INT(lowest+(highest-lowest)*RAND()) which the highest is 30000 and the lowest is 10500 and the second is generated which the formula you provided (thanks again!) and I am trying to discover the probability of "winning" the bid or having the lowest

#### c_m

##### Well-known Member
Both the formula generates random numbers uniformly distributed between 10500 and 30000. Therefore, on average, the probability of one number being higher than the other one is 50%.

#### barry houdini

##### MrExcel MVP
Note that if you use the formula

=INT(lowest+(highest-lowest)*RAND())

then it will never generate exactly the highest value. To do that you need to change to

=INT(lowest+(highest-lowest+1)*RAND())

#### JamiePasley

##### New Member
Thanks for the formula help I figured out what the problem is one bid is set to 13,000 the other varies with the formula <TABLE style="WIDTH: 265pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=353 border=0><COLGROUP><COL style="WIDTH: 265pt; mso-width-source: userset; mso-width-alt: 12909" width=353><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl63 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: #f0f0f0; BORDER-LEFT: #f0f0f0; WIDTH: 265pt; BORDER-BOTTOM: #f0f0f0; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=353 height=17>=INT(lowest+(highest-lowest+1)*RAND())</TD></TR></TBODY></TABLE>
how would i figure out the probability of 13000 being higher than the random. lowest=10500 highest=30000

#### c_m

##### Well-known Member
the probability of 13000 being higher than random
= (13000-10500)/(30000-10500)

Replies
4
Views
229
Replies
6
Views
982
Replies
2
Views
659
Replies
2
Views
540
Replies
4
Views
302

1,195,746
Messages
6,011,412
Members
441,613
Latest member
worksux

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back