Rand with decimals (positive value + negative value)

ankitanks

New Member
Joined
Dec 10, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi guys,

I am tryin really hard to find a solution to this but no luck so far. I need two sets of random values.

1. Between 1 & 4. With one decimal
2. Between -17 & -20. With one decimal

Can you please help me achieve this?

Thank you heaps.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi & welcome to MrExcel

What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Thanks for that, how about
+Fluff 1.xlsm
A
1
22.5
3-19.4
Main
Cell Formulas
RangeFormula
A2A2=RANDBETWEEN(10,40)/10
A3A3=RANDBETWEEN(-200,-170)/10


And format the cell for 1 decimal
 
Upvote 0
Thank you. That worked like a treat. Can you please explain the logic behind (10,40) & (-200, -170).
 
Upvote 0
By using 10 & 40 & then dividing by 10 you get a number between 1 & 4 with one decimal place.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top