Hi,
I wonder if i can pick random numbers from specific numbers.
Say, I would like to pick 3 of any numbers from following numbers (1, 3, 19, 29, 100, 210, 1000).
Please advise if there is any way to do this.
Thanks
MK
Hi,
I wonder if i can pick random numbers from specific numbers.
Say, I would like to pick 3 of any numbers from following numbers (1, 3, 19, 29, 100, 210, 1000).
Please advise if there is any way to do this.
Thanks
MK
Last edited by dogbural; 01-24-2022 at 06:58 AM. Reason: solved
Where would these numbers appear? In separate cells or all in one cell?
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Do you want to allow repeats? Something like =INDEX($A$1:$A$7,RANDBETWEEN(1,7)) will randomly choose one number from the list entered in A1:A7. 3 copies of that function will randomly choose three numbers, with the possibility of repeats.
Do you want the selections to be unique? I like to think of that as a "shuffle/sort" operation that usually looks something like entering the numbers into A1:A7, entering random unique numbers in B1:B7 (RAND() function), sorting the list by column B, then reading from the top of column A.
What kind of random selection are you trying to accomplish here?
Originally Posted by shg
One way to produce unique values (non-repeating):
=INDEX(A:A,AGGREGATE(15,6,ROW($A$1:$A$7)/NOT(COUNTIF($C$1:C1, INDEX(A:A,ROW($A$1:$A$7)))), RANDBETWEEN(1,8-ROW(C1))))
The bit in red is the number of values in your choice... plus 1.
You seem to be using an older version of Excel than me. So, please refer to the attached file. If the formulae are enclosed within a pair of { }, these are array formulae.
These are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.
You will know the array is active when you see the curly brackets { } appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.
Don't type the curly brackets yourself - it won't work...
Glenn
None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.
Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh
Thanks All.
If you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks