how to extract randomly a number based on a matrix

jamiguel77

Active Member
Joined
Feb 14, 2006
Messages
384
Office Version
  1. 2016
  2. 2010
  3. 2007
Platform
  1. Windows
  2. Web
hi all

based on this thread:


with this formula i generated 700 numbers Unique (see the post, please)
=WRAPROWS(TAKE(SORT(HSTACK(SEQUENCE(700),TAKE(UNIQUE(RANDARRAY(10000,1,1,100000,1),FALSE,FALSE),700)),2,1),,1),5)

My question now is:

from these matrix generated, how to take randomly 1 number? and put the result on, G2

i am think in a formula RANDOM.BETWEEN(1,700) but i am not sure,
but I would like it better the other way
Thanks
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I'm not following something here. If you're using an array to generate a table of random numbers and you only want 1 value, why don't you shrink the array to just 1 element?
 
Upvote 0
If you notice there are 140 lines with 5 numbers, 140 people will sign up and in the end they will be given something to the number that appears in G2
 
Upvote 0
Yes, I see you have 700 unique numbers.

Why are you generating 700 unique numbers on the sheet and then selecting 1 random number from the 700 unique numbers?

Why can't you skip the table altogether and do this?
Excel Formula:
=RANDBETWEEN(1,700)
 
Upvote 0
Like Cubist, I'm not quite sure what you are after, but you can simplify your current formula to
Excel Formula:
=WRAPROWS(SORTBY(SEQUENCE(700),RANDARRAY(700)),5)
 
Upvote 0

Forum statistics

Threads
1,216,725
Messages
6,132,337
Members
449,719
Latest member
excel4mac

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