Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
mcmil
 
Posts: n/a
Default index random questions

i am sort of new at this and dealing with functions. i have a question about
indexing. once i have randomly generated a name or number from a list i
previously set up (and i got the random name by
using=index(a73:a173,rand()*99+1) how do i now generate another name but
making sure that the two names do not come up twice. is there an easy formula
for this?
i use it for numbers also, i guess there's no difference. in other words i
dont wont the names/numbers to come up twice when generating.
thanks.
  #2   Report Post  
Ragdyer
 
Posts: n/a
Default

What you're really looking for is a *random order* of pre-determined data,
names or numbers.

The simplest approach for something like this is to insert a column along
side your existing column of data, and enter the Rand() function in this
column.
Then sort the 2 columns, with the Rand() function as the sort key, and
you'll have your "Random Order", of course, without any duplication.

There are slightly more intricate procedures using a formula, where you can
display a new random order with every click of the <F9 key, where sorting
is not necessary.

Post back if you might be interested in this.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"mcmil" wrote in message
...
i am sort of new at this and dealing with functions. i have a question

about
indexing. once i have randomly generated a name or number from a list i
previously set up (and i got the random name by
using=index(a73:a173,rand()*99+1) how do i now generate another name but
making sure that the two names do not come up twice. is there an easy

formula
for this?
i use it for numbers also, i guess there's no difference. in other words i
dont wont the names/numbers to come up twice when generating.
thanks.


  #3   Report Post  
mcmil
 
Posts: n/a
Default

yes thats what i mostly use to generate the numbers i hit (f9). i'm still not
to clear but i'll try the ask the question i'm thinking of. lets say that you
have a 52 card deck (which is mostly what i'm generating) and with each
number that comes up after generating i have a corresponding text that comes
up with (ex. if i generate a 1 out of rand()*51+1 then the text will come up
as 2 of clubs etc..). so i guess what i'm trying to ask is there a formula
for making sure that your five card hand is not dupliacted? does this make
any sense? i appreciate youyr feedback.

"Ragdyer" wrote:

What you're really looking for is a *random order* of pre-determined data,
names or numbers.

The simplest approach for something like this is to insert a column along
side your existing column of data, and enter the Rand() function in this
column.
Then sort the 2 columns, with the Rand() function as the sort key, and
you'll have your "Random Order", of course, without any duplication.

There are slightly more intricate procedures using a formula, where you can
display a new random order with every click of the <F9 key, where sorting
is not necessary.

Post back if you might be interested in this.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"mcmil" wrote in message
...
i am sort of new at this and dealing with functions. i have a question

about
indexing. once i have randomly generated a name or number from a list i
previously set up (and i got the random name by
using=index(a73:a173,rand()*99+1) how do i now generate another name but
making sure that the two names do not come up twice. is there an easy

formula
for this?
i use it for numbers also, i guess there's no difference. in other words i
dont wont the names/numbers to come up twice when generating.
thanks.



  #4   Report Post  
RagDyeR
 
Posts: n/a
Default

You can put your list of playing cards in an "out-of-the-way" portion of
your sheet, say Y1:Y52.
In Z1:Z52 enter the rand function:

=RAND()

Then, enter this formula anywhere you wish, and copy it down 5 cells.
For me, it would be 7 cells, 'cause I'm partial to 7 card stud.<g

=INDEX($Y$1:$Y$52,RANK(Z1,$Z$1:$Z$52))
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"mcmil" wrote in message
...
yes thats what i mostly use to generate the numbers i hit (f9). i'm still
not
to clear but i'll try the ask the question i'm thinking of. lets say that
you
have a 52 card deck (which is mostly what i'm generating) and with each
number that comes up after generating i have a corresponding text that comes
up with (ex. if i generate a 1 out of rand()*51+1 then the text will come up
as 2 of clubs etc..). so i guess what i'm trying to ask is there a formula
for making sure that your five card hand is not dupliacted? does this make
any sense? i appreciate youyr feedback.

"Ragdyer" wrote:

What you're really looking for is a *random order* of pre-determined data,
names or numbers.

The simplest approach for something like this is to insert a column along
side your existing column of data, and enter the Rand() function in this
column.
Then sort the 2 columns, with the Rand() function as the sort key, and
you'll have your "Random Order", of course, without any duplication.

There are slightly more intricate procedures using a formula, where you

can
display a new random order with every click of the <F9 key, where sorting
is not necessary.

Post back if you might be interested in this.
--
Regards,

RD

--------------------------------------------------------------------------

-
Please keep all correspondence within the NewsGroup, so all may benefit !
--------------------------------------------------------------------------

-

"mcmil" wrote in message
...
i am sort of new at this and dealing with functions. i have a question

about
indexing. once i have randomly generated a name or number from a list i
previously set up (and i got the random name by
using=index(a73:a173,rand()*99+1) how do i now generate another name but
making sure that the two names do not come up twice. is there an easy

formula
for this?
i use it for numbers also, i guess there's no difference. in other words

i
dont wont the names/numbers to come up twice when generating.
thanks.





  #5   Report Post  
Bernd Plumhoff
 
Posts: n/a
Default

Hello,

I suggest to use my function UniqRandInt().

Then you might enter (as array formula - enter with CTRL + SHIFT + ENTER):
=index(a73:a173,uniqrandint(100))

HTH,
Bernd


  #6   Report Post  
mcmil
 
Posts: n/a
Default

thanks alot guys both seem to work well. i really appreciate your help and
i'll probably have more questions later i imagine.
again thanks.

"Bernd Plumhoff" wrote:

Hello,

I suggest to use my function UniqRandInt().

Then you might enter (as array formula - enter with CTRL + SHIFT + ENTER):
=index(a73:a173,uniqrandint(100))

HTH,
Bernd

  #7   Report Post  
RagDyer
 
Posts: n/a
Default

Thanks for the feed-back.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"mcmil" wrote in message
...
thanks alot guys both seem to work well. i really appreciate your help

and
i'll probably have more questions later i imagine.
again thanks.

"Bernd Plumhoff" wrote:

Hello,

I suggest to use my function UniqRandInt().

Then you might enter (as array formula - enter with CTRL + SHIFT +

ENTER):
=index(a73:a173,uniqrandint(100))

HTH,
Bernd


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
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
Selecting at random with weighted probability Damage Excel Worksheet Functions 2 January 31st 05 11:06 PM
how do i turn the help index on again? yukk Excel Discussion (Misc queries) 1 January 21st 05 11:07 PM
Random Number Questions Greegan Excel Worksheet Functions 1 January 5th 05 02:00 AM
index to a range of cells Frank Kabel Excel Worksheet Functions 0 October 27th 04 05:39 PM


All times are GMT +1. The time now is 01:56 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"