Getting a set of random selection from a range

gifariz

Board Regular
Joined
May 2, 2021
Messages
128
Office Version
  1. 365
Platform
  1. Windows
Hi. Suppose I have a column range of 10 cells. I would like to get 8 of them uniquely and randomly. How do I do that (without macro)? Thanks.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Here's one way.
Book1
ABCD
1Sample spaceRandRankRandom Samples
2A0.104448939I
3B0.550595785E
4C0.347058987G
5D0.443181226F
6E0.663691114D
7F0.925743792B
8G0.930958861A
9H0.0925118810J
10I0.858281993
11J0.210780378
Sheet4
Cell Formulas
RangeFormula
B2:B11B2=RANDARRAY(10)
D2:D9D2=INDEX($A$2:$A$11,C2)
C2:C11C2=RANK(B2,$B$2#)
Dynamic array formulas.
 
Upvote 0
Solution
Here's one way.
Book1
ABCD
1Sample spaceRandRankRandom Samples
2A0.104448939I
3B0.550595785E
4C0.347058987G
5D0.443181226F
6E0.663691114D
7F0.925743792B
8G0.930958861A
9H0.0925118810J
10I0.858281993
11J0.210780378
Sheet4
Cell Formulas
RangeFormula
B2:B11B2=RANDARRAY(10)
D2:D9D2=INDEX($A$2:$A$11,C2)
C2:C11C2=RANK(B2,$B$2#)
Dynamic array formulas.
Great! Thank you
 
Upvote 0
Another option without helper cells
Excel Formula:
=TAKE(SORTBY(A2:A11,RANDARRAY(ROWS(A2:A11))),8)
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,141
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top