Select a random number from a list then remove, rinse, repeat

tezza

Active Member
Joined
Sep 10, 2006
Messages
375
Office Version
  1. 2016
  2. 2010
Platform
  1. Windows
  2. Web
Hi all,

Ok, I'll try to explain what I need.

I have a number list 1 - 90

The numbers are split in 9 groups

I need to randomly pick 5 groups then randomly pick 1 number from each of the groups,
Show the numbers picked
remove the picked numbers from the original list

After the first round of picks the list of numbers reduce by five

With the remaining numbers I need to repeat the process - choose 5 random numbers from 5 random groups and remove from list

Rinse and repeat until there are no numbers left

When all the numbers in a group have been used then that group needs to be eliminated.

Bingo.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBEBFBGBHBIBJBKBLBMBNBOBPBQBRBSBTBUBVBWBXBYBZCACBCCCDCECFCGCHCICJCKCLCMCNCOCPCQCR
1Random No:GroupGroupGroupGroupGroupGroupGroupGroupGroup
212345123456789
311344068711234567910121314151617181920222324252627282930313233353637384142434446474950515253545658596061636465666769707273747576777879818283848687888990
48214855801234567910121314151617181920222324252627282930313233353637384142434446474950515253545658596061636465666769707273747576777879818283848687888990
539455762851234567910121314151617181920222324252627282930313233353637384142434446474950515253545658596061636465666769707273747576777879818283848687888990
Sheet1
 
Peter, is everything ok?
Absolutely

Your interactions through this post have been irregularly negative, and almost implying I'm thick or something.
Sorry if you feel that way. I thought that I was offering more than most other helpers in the forum.

That probably explains why all the 4's came out one after the other, the actual chances of that is higher than winning the lottery, but don't worry, I get your point - EXACTLY
I'm glad you get my point, random choices are just that. Those values were generated randomly!

Not to worry, in the background the answer silently came, without any negativity:
I'm glad that the answer came magically and without any negativity (& without complete randomness as the patterns in Sub setPatterns(ByRef Patterns As Object) and Sub setSix(ByRef Six As Object) not at all random)

Still, if you are happy, then so am I. (y)
Thanks for letting us know.
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,214,426
Messages
6,119,411
Members
448,894
Latest member
spenstar

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