random variables

  • Thread starter Thread starter Craig Carden
  • Start date Start date
C

Craig Carden

I need excel to extract random variables from a
spreadsheet based on several different columns. I need
random rows that have specific data in each column pulled
from the spreadsheet based on one or more of the specific
data in each column. For example, each row is a group of
meter routes and I want to randomly select one meter from
several different routes based on different critieria
such as age, usage, and location. Please respond if
anyone can assist me with a formula to operate this.
Thanks. Craig
..
 
To start you off, this formula returns the contents of a cell in
random row in the range 1 to 100 of the range A1:K100, column 1 (=A)
The random number changes each time the worksheet recalculates (pres
key F9).
=INDEX($A$1:$K$100,INT(RAND()*100)+1,1)

This will probably not be practical for your purpose, so I sugges
using a separate column for the random number with the formula :-
=INT(RAND()*100)+1
and you can then have other cells in the row referring to this (her
A2) to pick up the data from the table :=
=INDEX(Sheet2!$A$1:$K$100,A2,1) for column 1

in column 2
=INDEX(Sheet2!$A$1:$K$100,A2,2)
etc
 
THANKS BRIAN! THE SECOND FORMULA WORKED PERFECTLY WITH A
LITTLE TWEAKING FOR MY WORKSHEET (I HAD OVER 7,000
ROWS). YOUR HELP IS VERY MUCH APPRECIATED.
 
Back
Top