Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I'm trying to get a series of random monetary numbers that are between $0.01
and $99.99. Using "=randombetween(.01,99.99)" seems to only give the dollars and makes no cents (pun intended). The only way I've figured to do this is by using the formula "=RANDBETWEEN(1,99)/100+RANDBETWEEN(1,99)". Is there a more elegant way? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this:
=ROUND(RAND()*(99.99-0.01)+0.01,2) -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Bob Arnett" wrote in message ... I'm trying to get a series of random monetary numbers that are between $0.01 and $99.99. Using "=randombetween(.01,99.99)" seems to only give the dollars and makes no cents (pun intended). The only way I've figured to do this is by using the formula "=RANDBETWEEN(1,99)/100+RANDBETWEEN(1,99)". Is there a more elegant way? |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
numbers that are between $0.01 and $99.99.
"=RANDBETWEEN(1,99)/100 + RANDBETWEEN(1,99)". I may be wrong, but it appears that your equation gives a minimum value of 1 +.01 (=1.01) vs your stated 0.01. How about a slight change to your equation? =RANDBETWEEN(1,9999)/100 = = = = HTH :) Dana DeLouis Bob Arnett wrote: I'm trying to get a series of random monetary numbers that are between $0.01 and $99.99. Using "=randombetween(.01,99.99)" seems to only give the dollars and makes no cents (pun intended). The only way I've figured to do this is by using the formula "=RANDBETWEEN(1,99)/100+RANDBETWEEN(1,99)". Is there a more elegant way? |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks, both formulas work perfectly but I do prefer the
"=RANDBETWEEN(1,9999)/100". "Dana DeLouis" wrote: numbers that are between $0.01 and $99.99. "=RANDBETWEEN(1,99)/100 + RANDBETWEEN(1,99)". I may be wrong, but it appears that your equation gives a minimum value of 1 +.01 (=1.01) vs your stated 0.01. How about a slight change to your equation? =RANDBETWEEN(1,9999)/100 = = = = HTH :) Dana DeLouis Bob Arnett wrote: I'm trying to get a series of random monetary numbers that are between $0.01 and $99.99. Using "=randombetween(.01,99.99)" seems to only give the dollars and makes no cents (pun intended). The only way I've figured to do this is by using the formula "=RANDBETWEEN(1,99)/100+RANDBETWEEN(1,99)". Is there a more elegant way? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split dollars and cents | Excel Worksheet Functions | |||
Extracting dollars and cents | Excel Worksheet Functions | |||
Extracting dollars and cents | Excel Worksheet Functions | |||
how do i sum dollars & cents in different columns | Excel Worksheet Functions | |||
Splitting dollars and cents | Excel Discussion (Misc queries) |