Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Brainless_in_Boston
 
Posts: n/a
Default combine Rand & Roundup?

I am playing with numbers today.

I set a1:a100 with whole numbers 1 to 100. Then for b1:b100 entered =RAND()

However, instead of whole integers, I got decimals, like: 0.3356457

when I installed the right add in, Analysis ToolPak and used this formula:

=RANDBETWEEN(1,100), I got whole integers .

Anyone know why the =RAND() derived decimals? is there a way to have whole
integers generated using rand & roundup in b1:b100?

Inquiring minds wnat to knwo.

Thanks for all your help. This is a great forum.

(too bad MS doesn't have better help online!)

Mark
Boston
  #2   Report Post  
Posted to microsoft.public.excel.newusers
SVC
 
Posts: n/a
Default combine Rand & Roundup?

RAND() generates a random number between 0 and 1 (see Excel Help description
of RAND)

To generate an integer rounded up and between 0 and 100, try
=ROUNDUP(RAND()*100,0)

"Brainless_in_Boston" wrote:

I am playing with numbers today.

I set a1:a100 with whole numbers 1 to 100. Then for b1:b100 entered =RAND()

However, instead of whole integers, I got decimals, like: 0.3356457

when I installed the right add in, Analysis ToolPak and used this formula:

=RANDBETWEEN(1,100), I got whole integers .

Anyone know why the =RAND() derived decimals? is there a way to have whole
integers generated using rand & roundup in b1:b100?

Inquiring minds wnat to knwo.

Thanks for all your help. This is a great forum.

(too bad MS doesn't have better help online!)

Mark
Boston

  #3   Report Post  
Posted to microsoft.public.excel.newusers
Brainless_in_Boston
 
Posts: n/a
Default combine Rand & Roundup?

SVC -

You are the coolest, baby!

Great formula. Thanks for posting it. Very clean and efective.

You are also right to suggest MS Help for RAND. It only generates a random
number 0 and <1 when you use =RAND()

=RAND()*100 generates a number like 95.451267

veddy interesting.

Anyone know how to use Excel to calculate pi to 50 decimals?

Mark
Boston

=========================================

"SVC" wrote:

RAND() generates a random number between 0 and 1 (see Excel Help description
of RAND)

To generate an integer rounded up and between 0 and 100, try
=ROUNDUP(RAND()*100,0)


==========================
"Brainless_in_Boston" wrote:

I am playing with numbers today.

I set a1:a100 with whole numbers 1 to 100. Then for b1:b100 entered =RAND()

However, instead of whole integers, I got decimals, like: 0.3356457

when I installed the right add in, Analysis ToolPak and used this formula:

=RANDBETWEEN(1,100), I got whole integers.

Anyone know why the =RAND() derived decimals? is there a way to have whole
integers generated using rand & roundup in b1:b100?

Inquiring minds want to know.

Thanks for all your help. This is a great forum.

(too bad MS doesn't have better help online!)

Mark
Boston

  #4   Report Post  
Posted to microsoft.public.excel.newusers
David J. Braden
 
Posts: n/a
Default combine Rand & Roundup?

You're biasing the integers upward; better to use
=INT(RAND()*100+1

HTH
Dave Braden

Brainless_in_Boston wrote:
SVC -

You are the coolest, baby!

Great formula. Thanks for posting it. Very clean and efective.

You are also right to suggest MS Help for RAND. It only generates a random
number 0 and <1 when you use =RAND()

=RAND()*100 generates a number like 95.451267

veddy interesting.

Anyone know how to use Excel to calculate pi to 50 decimals?

Mark
Boston

=========================================

"SVC" wrote:

RAND() generates a random number between 0 and 1 (see Excel Help description
of RAND)

To generate an integer rounded up and between 0 and 100, try
=ROUNDUP(RAND()*100,0)


==========================
"Brainless_in_Boston" wrote:
I am playing with numbers today.

I set a1:a100 with whole numbers 1 to 100. Then for b1:b100 entered =RAND()

However, instead of whole integers, I got decimals, like: 0.3356457

when I installed the right add in, Analysis ToolPak and used this formula:

=RANDBETWEEN(1,100), I got whole integers.

Anyone know why the =RAND() derived decimals? is there a way to have whole
integers generated using rand & roundup in b1:b100?

Inquiring minds want to know.

Thanks for all your help. This is a great forum.

(too bad MS doesn't have better help online!)

Mark
Boston


--
Please keep response(s) solely within this thread.
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
How do you combine columns? bailey Excel Discussion (Misc queries) 1 December 11th 05 06:04 AM
combine row and the delete duplicates bamamike Excel Discussion (Misc queries) 2 September 20th 05 04:16 PM
How to combine text from multiple cells? sierra Excel Worksheet Functions 3 July 11th 05 01:55 PM
How do you combine two columns to one? StTrumpet Excel Discussion (Misc queries) 4 March 22nd 05 02:10 AM
How can I combine 3 separate mailing list? Baylynx New Users to Excel 3 February 1st 05 04:53 PM


All times are GMT +1. The time now is 06:20 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"