# Rand number between two demical values

#### Eyeson15

##### Board Regular
Hi there
I know there are lots of solutions available but none of them fits my purpose.
I have two numbers,
7.59293
7.67213
Without using VBA (if possible), how can I return a value between these two values with same number of decimal places as well?
James

### Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

##### Well-known Member
Use this:
Excel Formula:
``=RandBetween(759293,767213)/100000``

#### Phuoc

##### Active Member
Or try:

=RAND()*(\$B\$1-\$A\$1)+\$A\$1

#### Eyeson15

##### Board Regular
Use this:
Excel Formula:
``=RandBetween(759293,767213)/100000``
Thank you THIS WORKS. Stupid me... thank you!

#### Eyeson15

##### Board Regular

Or try:

=RAND()*(\$B\$1-\$A\$1)+\$A\$1
Hi Phuoc I tried it but it creates a value that has 4 more decimal places. like this 7.657837042
Thank you nonetheless!

##### Well-known Member
You're Welcome and Glad we can Help.

#### Phuoc

##### Active Member
You can use the Round function:

=ROUND(RAND()*(\$B\$1-\$A\$1)+\$A\$1,5)

#### Eyeson15

##### Board Regular
You can use the Round function:

=ROUND(RAND()*(\$B\$1-\$A\$1)+\$A\$1,5)
VERY GOOD solution! Thank you!

Replies
7
Views
65
Replies
5
Views
97
Replies
6
Views
91
Replies
2
Views
109
Replies
2
Views
126

### Forum statistics

1,127,107
Messages
5,622,780
Members
415,927
Latest member
vedasinternational

### 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