Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default VBA module/function to generate random numbers with specified mean and SD

Thanks to you all.


"Robert Reid" wrote in message
...
Thanks for the response Mike,

I'm not sure how I would use the excel function to generate 20 numbers
that have a prespecified SD and mean using VBA.

Can you clarify.

"Mike Middleton" wrote in message
...
Robert Reid -

=NORMINV(RAND(),mean,stdev)

Caveat: Both NormInv and Rand may return numerically inaccurate results
in pre-2003 Excel.

- Mike
www.mikemiddleton.com


"Robert Reid" wrote in message
...
Hi all,

As basis for a school assignment I need to generate 20 random numbers
that have a prespecified mean and standard deviation ( I don't believe
they have to be normally distrubted).

Can anyone help?

The output would preferably be to Worksheets("Sheet1").Range("A1:A20")
though an array would also work.

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
Generate random numbers cawhitaker Excel Discussion (Misc queries) 3 September 27th 07 09:01 PM
Generate Random numbers from a pre-defined set frankjh19701 Excel Worksheet Functions 0 January 11th 07 05:20 PM
generate a random number and use if function to generate new data Dogdoc1142 Excel Worksheet Functions 4 April 26th 06 03:44 AM
Generate random numbers between two values and with a given mean pinosan Excel Worksheet Functions 2 March 7th 05 02:04 PM
generate random numbers Jules Excel Worksheet Functions 6 November 2nd 04 05:57 PM


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