Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / November 2004

Tip: Looking for answers? Try searching our database.

how do I generate test data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
giles - 30 Nov 2004 10:55 GMT
I want to generate sample data - maybe 200 numbers from 1 to 7 but wieghted
towards one end - any ideas?
JulieD - 30 Nov 2004 11:10 GMT
Hi

Bernd Plumhoff posted this formula recently for generating random numbers
between two values (stored in A1 and B1) ... so select your 200 cells type
this formula and use control & enter to enter it into all the selected cells
at once.

=MIN($A$1,$B$1)+INT(RAND()*(MAX($A$1,$B$1)-MIN($A$1,$B$1)+1))

This however, doesn't weight them in any way.

Cheers
JulieD

>I want to generate sample data - maybe 200 numbers from 1 to 7 but wieghted
> towards one end - any ideas?
JE McGimpsey - 30 Nov 2004 13:17 GMT
Weighted how?

Here's one way to get a distribution weighted toward 0. Select A1:A200,
and array-enter (CTRL-SHIFT_ENTER or CMD-RETURN):

   =INT(RAND()*RAND()*7)+1

conversely, weighted toward 7 (also array-entered):

   =7-INT(RAND()*RAND()*8)

You could also enter regularly each formula in cell A1 and copy down.

> I want to generate sample data - maybe 200 numbers from 1 to 7 but wieghted
> towards one end - any ideas?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.