Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 48
Default using randombetween to arrive at dollars and cents

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default using randombetween to arrive at dollars and cents

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 690
Default using randombetween to arrive at dollars and cents

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 48
Default using randombetween to arrive at dollars and cents

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
split dollars and cents yodochi Excel Worksheet Functions 8 August 16th 07 12:11 AM
Extracting dollars and cents Pradhan Excel Worksheet Functions 1 March 28th 07 03:37 AM
Extracting dollars and cents Teethless mama Excel Worksheet Functions 0 March 28th 07 01:05 AM
how do i sum dollars & cents in different columns Eric Excel Worksheet Functions 5 November 21st 05 02:42 AM
Splitting dollars and cents ncbuilder01 Excel Discussion (Misc queries) 7 October 6th 05 01:00 PM


All times are GMT +1. The time now is 12:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"