I have 138 numbers, how do i get 15 random numbers from my data?

R

RagDyeR

It's considered bad manners when you don't use the body of the post for your
actual question.

BUT -

This is for a random list "without replacement" - (no duplicates).

Numbers in A1 to A138.

In an out of the way location, say Z1, enter this formula:
=Rand()
And copy down to Z138.

Enter this is B1:

=INDEX(ROW($A$1:$A$138),RANK(Z1,$Z$1:$Z$138))

And copy down as many rows as you wish to retrieve random numbers.

Now, each time you hit <F9>, you'll get a new list.

***OR***

You could copy that Rand() formula down Column B,
Select A1 to B138,
And sort, using Column B as the sort key.
Then, use the first 15 rows for your random data.
--

HTH,

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


news:D[email protected]...
 
M

Max

Pleasure to see you around, RD !
Its been quite awhile since I bumped into your responses
 
J

Joe User

RagDyeR said:
It's considered bad manners when you don't use
the body of the post for your actual question.

It's more than just a netiquette thing.

First, some newsreaders truncate long subject lines.

Second, it is very rare that a one-line description can tell the whole
story. That is, almost every question requires some embellishment. (But
the "embellishment" should completely repeat or restate the subject line as
well.)

For example, in this case, the Stan might have told us whether he wants
selection with or without replacement. Of course, we can make a reasonable
ass-u-me-tion. But there is a reason why the last word is hyphenated ;-).

Also, if Stan had told us that the 138 numbers are consecutive starting with
1 (or any other number), someone might have a good suggestion for a
simplified design. Again, otherwise we each make our own ass-u-me-tions,
which might lead to a confusing thread.

Finally, third, with some newsreaders, it might be inconvenient to refer to
a separate subject line. For example, I like to "quote" the relevant part
of a message that I am responding to. Copy-and-pasting from the subject
line is not always straight-forward.

That is also one reason why the subject line should be repeated or restated
in the body of the message, along with any embellishment.


----- original message -----
 
R

RagDyeR

You bring up good points.

If the numbers are not in order, from 1 to 138,
use this formula instead:

=INDEX($A$1:$A$138,RANK(Z1,$Z$1:$Z$138))

This will randomize any data (numbers or text) that are contained in the
range A1 to A138.

Secondly, for a true random display (with replacement), where duplicates are
always a possibility, and more likely a probability, try this formula:

=INDEX(A$1:A$138,RAND()*138+1)

--

HTH,

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


"Joe User" <joeu2004> wrote in message
RagDyeR said:
It's considered bad manners when you don't use
the body of the post for your actual question.

It's more than just a netiquette thing.

First, some newsreaders truncate long subject lines.

Second, it is very rare that a one-line description can tell the whole
story. That is, almost every question requires some embellishment. (But
the "embellishment" should completely repeat or restate the subject line as
well.)

For example, in this case, the Stan might have told us whether he wants
selection with or without replacement. Of course, we can make a reasonable
ass-u-me-tion. But there is a reason why the last word is hyphenated ;-).

Also, if Stan had told us that the 138 numbers are consecutive starting with
1 (or any other number), someone might have a good suggestion for a
simplified design. Again, otherwise we each make our own ass-u-me-tions,
which might lead to a confusing thread.

Finally, third, with some newsreaders, it might be inconvenient to refer to
a separate subject line. For example, I like to "quote" the relevant part
of a message that I am responding to. Copy-and-pasting from the subject
line is not always straight-forward.

That is also one reason why the subject line should be repeated or restated
in the body of the message, along with any embellishment.


----- original message -----
 
R

RagDyeR

Hi Max,

Been too busy lately to spend time having fun and exercising my brain in
these groups.

We all have priorities.

Plus, trying to configure my new Windows 7 machine AND that darn XL07 Ribbon
is also a pain.

The light is visible at the end of the tunnel, so I'll be able to relax and
enjoy myself around here shortly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top