Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Selecting Random Data

Good Morning, I am using Excel 2003 with Windows XP.

In cell A I have a list of 40 values and I am trying to pull a random
sample. In column B I put Rand() and in Column C I put
=INDEX(A$1:A$200,RANK(B1,B$1:B$200))

I appers to be working in Colulmn C but Column B is displaying a number.
for example A:1 has the letter A in it. Column B has 0314237.

Why is it doing that. Is it something I have done and how do I fix it?

thanks in advance for your help!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Selecting Random Data

In cell A I have a list of 40 values and I am trying to pull a random
sample. In column B I put Rand() and in Column C I put
=INDEX(A$1:A$200,RANK(B1,B$1:B$200))


Assuming values to be sampled are in A1:A40
In B1: =RAND()
First, B1 has to be copied down to B40

And then in C1, place: =INDEX(A$1:A$40,RANK(B1,B$1:B$40))
C1 will then return a random sample from A1:A40,
which is re-generable via pressing the F9 key

You could of course copy C1 down by as many rows as desired to return more
random samples (non repeating), or till C40 for the maximum scramble of the
entire lot of source values in A1:A40
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Selecting Random Data

Thanks Max... I made these changes but Cell B:1 is still displaying a
number... I guess I can just hide the cell contents?? Also, F9 works to
change the random sample but it also changes evertime they hit enter on
another cell, even a blank one. Is there a way to prevent this?

Thanks again!!

"Max" wrote:

In cell A I have a list of 40 values and I am trying to pull a random
sample. In column B I put Rand() and in Column C I put
=INDEX(A$1:A$200,RANK(B1,B$1:B$200))


Assuming values to be sampled are in A1:A40
In B1: =RAND()
First, B1 has to be copied down to B40

And then in C1, place: =INDEX(A$1:A$40,RANK(B1,B$1:B$40))
C1 will then return a random sample from A1:A40,
which is re-generable via pressing the F9 key

You could of course copy C1 down by as many rows as desired to return more
random samples (non repeating), or till C40 for the maximum scramble of the
entire lot of source values in A1:A40
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Selecting Random Data

"myssieh" wrote:
Thanks Max... I made these changes but Cell B:1 is still displaying a
number... I guess I can just hide the cell contents??


Col B is a helper col, which could be hidden away for neatness

Also, F9 works to change the random sample
but it also changes evertime they hit enter on
another cell, even a blank one. Is there a way to prevent this?


Try setting the calc mode to Manual
Click Tools Options Calculation tab
Check "Manual" OK
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Selecting Random Data

that worked!!! Thanks so much!! Have a great day!!

"Max" wrote:

"myssieh" wrote:
Thanks Max... I made these changes but Cell B:1 is still displaying a
number... I guess I can just hide the cell contents??


Col B is a helper col, which could be hidden away for neatness

Also, F9 works to change the random sample
but it also changes evertime they hit enter on
another cell, even a blank one. Is there a way to prevent this?


Try setting the calc mode to Manual
Click Tools Options Calculation tab
Check "Manual" OK
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Selecting Random Data

Welcome, good to hear that.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"myssieh" wrote in message
...
that worked!!! Thanks so much!! Have a great day!!



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
Selecting a Random Sample of 15 from a Large data set RMort Excel Worksheet Functions 6 December 22nd 06 05:09 PM
Non-random numbers generated by excel's data analysis random gener Allie Excel Worksheet Functions 10 September 17th 05 06:19 AM
Non-random numbers generated by excel's data analysis random gener Harlan Grove Excel Discussion (Misc queries) 2 September 13th 05 04:06 PM
Selecting Random Data Willie Excel Worksheet Functions 2 August 18th 05 06:26 PM
Selecting at random with weighted probability Damage Excel Worksheet Functions 2 January 31st 05 11:06 PM


All times are GMT +1. The time now is 02:35 PM.

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"