Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Random selection method

In an Excel spreadsheet, is there a method to randomly select criteria off
the worksheet? For example, I need to randomly select (1% or 40 items) from
the list to conduct an analysis. If this can be accomplished, would you be
willing to share your process for accomplishing same. Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default Random selection method

One way. If your numbers are in A1:A100 then in B1 put
=IF(RAND()<=0.1,"Select this","")
Change the fraction 0.1 until you're satisfied with the selection.. Then
copy the cells B1:B100 and
paste special/values back into B1:B100 or another column because RAND() is
a volatile function
and is recalculated anytime anything else on the worksheet is calculated
RAND() generates random numbers from 0 through less than 1 - i.e.
0.99999999999999999 or so..

Tyro

"Renegade" wrote in message
...
In an Excel spreadsheet, is there a method to randomly select criteria off
the worksheet? For example, I need to randomly select (1% or 40 items)
from
the list to conduct an analysis. If this can be accomplished, would you
be
willing to share your process for accomplishing same. Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default Random selection method

Correction:
If your numbers are in A1:A100 then in B1 put =IF(RAND()<=0.1,"Select
this","")
should read:
If your numbers are in A1:A100 then in B1 put =IF(RAND()<=0.1,"Select
this","") and drag down through B100.


"Tyro" wrote in message
...
One way. If your numbers are in A1:A100 then in B1 put
=IF(RAND()<=0.1,"Select this","")
Change the fraction 0.1 until you're satisfied with the selection.. Then
copy the cells B1:B100 and
paste special/values back into B1:B100 or another column because RAND()
is a volatile function
and is recalculated anytime anything else on the worksheet is calculated
RAND() generates random numbers from 0 through less than 1 - i.e.
0.99999999999999999 or so..

Tyro

"Renegade" wrote in message
...
In an Excel spreadsheet, is there a method to randomly select criteria
off
the worksheet? For example, I need to randomly select (1% or 40 items)
from
the list to conduct an analysis. If this can be accomplished, would you
be
willing to share your process for accomplishing same. Thanks in advance.





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 418
Default Random selection method

"Renegade" wrote:
In an Excel spreadsheet, is there a method to randomly select criteria off
the worksheet? For example, I need to randomly select (1% or 40 items)
from the list to conduct an analysis.


Not sure what you mean by "select criteria off the worksheet". I assume you
mean that you need to select 1% (40 items) from a list presumably of 4000.
If I misunderstood and you do not get a better answer, please post back with
an example. Following my assumption....

Suppose your data is in A1:A4000. In a column of 4000 cells, say Z1:Z4000,
put the formula =RAND() in each cell. Then in a column (or row) of 40 cells,
say B1:B40, put the following formula, starting in B1 and copying down:

=index($A$1:$A$4000, rank(Z1, $Z$1:$Z$4000))

(Based on a solution by RagDyer for a different problem.)

Notes:

1. Note that the only relevative reference is the first argument of the RANK
function.

2. It would be prudent to cut and Paste SpecialValue the range containing
the RAND() formula. Otherwise, it will change every time you modify the
worksheet. You can over-paste the original range. Alternatively, Paste
SpecialValue into another range, refer to that range in the RANK function,
letting the RAND range change without effect. That provides you with a ready
set of new random numbers anytime you want to change the subset.

3. Although all the ranges in my example are parallel, that is not a
requirement for this method. That is, the ranges can start anywhere and go
in any direction (column or row) that they will fit. (Good luck finding 4000
columns ;-.)
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
Random Number Selection Work.Work.Work Excel Discussion (Misc queries) 4 February 4th 08 11:46 PM
Random Selection Craig Excel Worksheet Functions 3 September 27th 07 05:18 PM
Random Selection Cookie New Users to Excel 2 May 3rd 06 12:05 AM
Random Selection Cris Excel Worksheet Functions 2 October 16th 05 06:15 PM
How can I set up the random selection of a cell from within a ran. nybbac Excel Discussion (Misc queries) 5 January 1st 05 05:39 AM


All times are GMT +1. The time now is 07:04 PM.

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"