Excel Randomize Decimal Number

I found a very nice feature in MS Excel 2007 that is RANDBETWEEN(bottom, top) . The problem is that it randomizes only an integer. Using this formula:

 =RANDBETWEEN(7.0, 9.9) 

gives

 8.0 9.0 7.0 7.0 etc... 

How can I change it so that it also gives decimal numbers as shown below

 7.5 7.2 9.4 9.5 7.1 8.5 etc... 
+4
source share
3 answers

Use randbetween(70,99) and divide the result by 10.

+23
source

Since RANDBETWEEN() used exclusively in the Analysis ToolPak (and the #NAME error was not set in the absence of the ToolPak tool? ), You might be better off using RAND() for backward compatibility, multiplication and adding to shift the range and round to one decimal sign:

 =ROUNDUP(7 + RAND() * (9.9 - 7 - 0.1), 1) ' Excludes 7.0 and 9.9 =ROUNDUP(7 + RAND() * (9.9 - 7), 1) ' Excludes 7.0, includes 9.9 =ROUNDDOWN(7 + RAND() * (9.9 - 7), 1) ' Includes 7.0, excludes 9.9 =ROUNDDOWN(7 + RAND() * (9.9 - 7 + 0.1), 1) ' Includes 7.0 and 9.9 

But the problem with RANDBETWEEN() is a backward compatibility problem, so if you are sure that your table will be used only in Excel 2007 and higher, with any approach you will be fine.

+2
source

See http://ms-office.wonderhowto.com/how-to/generate-random-numbers-with-decimals-excel-338595/

Random decimal between 30-40

 =rand()*10+30 

Random decimal number from 0 to 100

 =rand()*100+0 
+2
source

Source: https://habr.com/ru/post/1414721/


All Articles