Thread: Random Matching
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sabotage1945
 
Posts: n/a
Default Random Matching


Hello everyone,

I'm doing some Random Matching in Excel 2003 for statistical purposes:
I've got a file with two worksheets containing student records (ID,
courses, grades, etc). One sheet contains 'Students who were tutored'
(200 or so records) and the other 'Students who were not tutored' (800
or so records).

Now I'd like to match up (pair up) those students of same sex, same
course and same age from both of these into one new sheet - while
maintaining a RANDOM selection for those 'Students who were not
tutored' of the same sex etc.

A few years ago I used something like this, but I can't recall what all
this means (using the steps I used):


- Created a tab called *Y* (for yes - tutored) lists all the tutored
students listed, and *N* (for not tutored).
- On the *N* tab, I have created a series called TBL1 producing
random numbers using the *-=RAND()-*, next to this column I have a
column of numbers generated based on the following formula
*-{=RANK(TBL1,TBL1)}-*
- On a seperate tab called *RND_CALC*, I have the first column
listing the student number of the Tutored students using the
following: *-=OFFSET(Y!$A$1,INT((ROW(A1)+2)/2),)-*. In the second
listing the non-tutored students using: *-=OFFSET(N!$A$1,N!K2,)-*
- On the RND_CALC tab, I then have a "SEX", "AGE", "COURSE" column.
Each having the following:

SEX
=--(VLOOKUP($A2,Y!$A$2:$D$25,COLUMN(B1),0)=VLOOKUP($B 2,N!$A$2:$D$62,COLUMN(B1),0))
AGE
=--(VLOOKUP($A2,Y!$A$2:$D$25,COLUMN(C1),0)=VLOOKUP($B 2,N!$A$2:$D$62,COLUMN(C1),0))
COURSE
=--(VLOOKUP($A2,Y!$A$2:$D$25,COLUMN(C1),0)=VLOOKUP($B 2,N!$A$2:$D$62,COLUMN(C1),0))



Can someone help me make some sense on how to ensure random matching
with this setup?

Thanks in advance,
Sab.


--
Sabotage1945
------------------------------------------------------------------------
Sabotage1945's Profile: http://www.excelforum.com/member.php...o&userid=14769
View this thread: http://www.excelforum.com/showthread...hreadid=536034