Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
giles
 
Posts: n/a
Default how do I generate test data

I want to generate sample data - maybe 200 numbers from 1 to 7 but wieghted
towards one end - any ideas?
  #2   Report Post  
JulieD
 
Posts: n/a
Default

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

"giles" wrote in message
...
I want to generate sample data - maybe 200 numbers from 1 to 7 but wieghted
towards one end - any ideas?



  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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.

In article ,
"giles" wrote:

I want to generate sample data - maybe 200 numbers from 1 to 7 but wieghted
towards one end - any ideas?

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
Help with data not getting plotted Scott Ehrlich Excel Discussion (Misc queries) 2 January 25th 05 05:17 AM
Help with data not getting plotted Scott Ehrlich Charts and Charting in Excel 1 January 23rd 05 05:15 PM
Charting data ranges that change mikelee101 Charts and Charting in Excel 2 December 16th 04 11:07 PM
Running Data Table using an input that triggers DDE linked data [email protected] Excel Discussion (Misc queries) 1 December 16th 04 11:56 AM
Data Table - Does it work with DDE links and stock tickers? Post Tenebras Lux Excel Discussion (Misc queries) 0 December 1st 04 05:15 PM


All times are GMT +1. The time now is 10:20 AM.

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

About Us

"It's about Microsoft Excel"