#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Random Numbers

Hey!

A question about random numbers in excel. I have a huge list of people and I
need to assign to each one a random number between 0.0 and 1.25.

The problem is I need the following:

70% of the people to be between 1 and 1.2
20% of the people to be above 1.2
10% of people below 1

any way I can do this randomly???

thanks!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Random Numbers

see your other post
--
Mike

When competing hypotheses are equal, adopt the hypothesis that introduces
the fewest assumptions while still sufficiently answering the question.
Occam''s razor (Abbrev)


"John Pivot Table" wrote:

Hey!

A question about random numbers in excel. I have a huge list of people and I
need to assign to each one a random number between 0.0 and 1.25.

The problem is I need the following:

70% of the people to be between 1 and 1.2
20% of the people to be above 1.2
10% of people below 1

any way I can do this randomly???

thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Random Numbers

John PT,

How about a pseudo-random approach?

Let's say that your list of names is in column A, starting in A2, with a header cell in A1. In B2,
enter the formula

=RANDBETWEEN(1000001,1199999)/1000000

and copy down until you match 70 % of your names. Then use

=RANDBETWEEN(1200001,1249999)/1000000

and copy down to match the next 20%, and finish with

=RANDBETWEEN(1,999999)/1000000

and copy down to match the last of your list.

(OR use, in B2

=IF(ROW(A1)<=ROUND(0.1*(COUNTA(A:A)-1),0),RANDBETWEEN(1,999999)/1000000,IF(ROW(A1)<=ROUND(0.8*(COUNTA(A:A)-1),0),RANDBETWEEN(1000001,1199999)/1000000,RANDBETWEEN(1200001,1249999)/1000000))

and copy down the whole way......)

This will create evenly distributed numbers (without duplication) close to the limits that you
describe (70% between 1 and 1.2 - how close depends on your population count). Then in C2, enter the
formula

=RAND()

and copy down to match column B.

Then select columns B and C, copy and pastespecial values, then sort B and C based on column C, and
delete column C.

HTH,
Bernie
MS Excel MVP


"John Pivot Table" wrote in message
...
Hey!

A question about random numbers in excel. I have a huge list of people and I
need to assign to each one a random number between 0.0 and 1.25.

The problem is I need the following:

70% of the people to be between 1 and 1.2
20% of the people to be above 1.2
10% of people below 1

any way I can do this randomly???

thanks!



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
getting numbers divisible by 4 from random numbers in ascending order ramana Excel Worksheet Functions 6 June 19th 07 06:41 PM
I want random numbers generated without repeating numbers Johncobb Excel Worksheet Functions 2 September 7th 06 04:52 PM
Can Excel pick random numbers from 1-300 and not repeat numbers? Julian Excel Discussion (Misc queries) 1 June 7th 06 07:17 AM
Non-random numbers generated by excel's data analysis random gener Allie Excel Worksheet Functions 10 September 17th 05 06:19 AM
Non-random numbers generated by excel's data analysis random gener Harlan Grove Excel Discussion (Misc queries) 2 September 13th 05 04:06 PM


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