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.
source share