Generate random lotto numbers in groups

Blackballexpress

New Member
Joined
Jun 27, 2012
Messages
5
Hi all,

Can anyone help me please:

I am trying to generate random lotto in 8 groups of 8 rows each.

The aim is to have 8 groups with the following criteria.
  • numbers appears only once per group;
  • if 16 & 27 appears together in the same row in group 1, it does not appear together again in any row of the other groups;
Optional

  • There should be no 4 number combinations in the rows that was previously selected in draws.

I am currently using the following formula:
Sheet = Calculations
In the culumns I have:
All formulas is dragged down
A =RAND()
B =RANK($B3;$B$3:$B$54)+COUNTIF(C$2:C2;C2)-1

[TABLE="width: 367"]
<tbody>[TR]
[TD][/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Rand[/TD]
[TD]Unique Rank[/TD]
[TD]Ball Number[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD="align: right"]0,102220611[/TD]
[TD]51[/TD]
[TD]1[/TD]
[TD]7[/TD]
[TD]8[/TD]
[TD]9[/TD]
[TD]10[/TD]
[TD]11[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD="align: right"]0,20398705[/TD]
[TD]44[/TD]
[TD]2[/TD]
[TD]13[/TD]
[TD]14[/TD]
[TD]15[/TD]
[TD]16[/TD]
[TD]17[/TD]
[TD]18[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD="align: right"]0,477662672[/TD]
[TD]32[/TD]
[TD]3[/TD]
[TD]19[/TD]
[TD]20[/TD]
[TD]21[/TD]
[TD]22[/TD]
[TD]23[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD="align: right"]0,552747222[/TD]
[TD]27[/TD]
[TD]4[/TD]
[TD]25[/TD]
[TD]26[/TD]
[TD]27[/TD]
[TD]28[/TD]
[TD]29[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD="align: right"]0,506884168[/TD]
[TD]30[/TD]
[TD]5[/TD]
[TD]31[/TD]
[TD]32[/TD]
[TD]33[/TD]
[TD]34[/TD]
[TD]35[/TD]
[TD]36[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD="align: right"]0,384547559[/TD]
[TD]36[/TD]
[TD]6[/TD]
[TD]37[/TD]
[TD]38[/TD]
[TD]39[/TD]
[TD]40[/TD]
[TD]41[/TD]
[TD]42[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD="align: right"]0,752876494[/TD]
[TD]16[/TD]
[TD]7[/TD]
[TD]43[/TD]
[TD]44[/TD]
[TD]45[/TD]
[TD]46[/TD]
[TD]47[/TD]
[TD]48[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD="align: right"]0,204919304[/TD]
[TD]43[/TD]
[TD]8[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD="align: right"]0,347860702[/TD]
[TD]37[/TD]
[TD]9[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD="align: right"]0,991859907[/TD]
[TD]2[/TD]
[TD]10[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD="align: right"]0,548126033[/TD]
[TD]28[/TD]
[TD]11[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD="align: right"]0,453121519[/TD]
[TD]33[/TD]
[TD]12[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD="align: right"]0,197456759[/TD]
[TD]45[/TD]
[TD]13[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD="align: right"]0,708482563[/TD]
[TD]20[/TD]
[TD]14[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD="align: right"]0,115405[/TD]
[TD]51[/TD]
[TD]15[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD="align: right"]0,259358455[/TD]
[TD]40[/TD]
[TD]16[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]18[/TD]
[TD="align: right"]0,175012773[/TD]
[TD]47[/TD]
[TD]17[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD="align: right"]0,813651919[/TD]
[TD]12[/TD]
[TD]18[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD="align: right"]0,127723026[/TD]
[TD]49[/TD]
[TD]19[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD="align: right"]0,91282479[/TD]
[TD]8[/TD]
[TD]20[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD="align: right"]0,43280353[/TD]
[TD]34[/TD]
[TD]21[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]23[/TD]
[TD="align: right"]0,117688382[/TD]
[TD]50[/TD]
[TD]22[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]24[/TD]
[TD="align: right"]0,950455468[/TD]
[TD]6[/TD]
[TD]23[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD="align: right"]0,718628697[/TD]
[TD]19[/TD]
[TD]24[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]26[/TD]
[TD="align: right"]0,835158982[/TD]
[TD]10[/TD]
[TD]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]27[/TD]
[TD="align: right"]0,960684958[/TD]
[TD]3[/TD]
[TD]26[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]28[/TD]
[TD="align: right"]0,248949597[/TD]
[TD]41[/TD]
[TD]27[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]29[/TD]
[TD="align: right"]0,911179321[/TD]
[TD]9[/TD]
[TD]28[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD="align: right"]0,61501937[/TD]
[TD]24[/TD]
[TD]29[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]31[/TD]
[TD="align: right"]0,405203367[/TD]
[TD]35[/TD]
[TD]30[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]32[/TD]
[TD="align: right"]0,960485786[/TD]
[TD]4[/TD]
[TD]31[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]33[/TD]
[TD="align: right"]0,478130291[/TD]
[TD]31[/TD]
[TD]32[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]34[/TD]
[TD="align: right"]0,609704978[/TD]
[TD]25[/TD]
[TD]33[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]35[/TD]
[TD="align: right"]0,653939378[/TD]
[TD]22[/TD]
[TD]34[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]36[/TD]
[TD="align: right"]0,689407296[/TD]
[TD]21[/TD]
[TD]35[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]37[/TD]
[TD="align: right"]0,242265148[/TD]
[TD]42[/TD]
[TD]36[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]38[/TD]
[TD="align: right"]0,957641772[/TD]
[TD]5[/TD]
[TD]37[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]39[/TD]
[TD="align: right"]0,770038372[/TD]
[TD]15[/TD]
[TD]38[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]40[/TD]
[TD="align: right"]0,738311875[/TD]
[TD]18[/TD]
[TD]39[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]41[/TD]
[TD="align: right"]0,073065667[/TD]
[TD]52[/TD]
[TD]40[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]42[/TD]
[TD="align: right"]0,617414067[/TD]
[TD]23[/TD]
[TD]41[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]43[/TD]
[TD="align: right"]0,174912359[/TD]
[TD]48[/TD]
[TD]42[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]44[/TD]
[TD="align: right"]0,532459304[/TD]
[TD]29[/TD]
[TD]43[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]45[/TD]
[TD="align: right"]0,271544494[/TD]
[TD]39[/TD]
[TD]44[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]46[/TD]
[TD="align: right"]0,790350128[/TD]
[TD]13[/TD]
[TD]45[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]47[/TD]
[TD="align: right"]0,771215945[/TD]
[TD]14[/TD]
[TD]46[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]48[/TD]
[TD="align: right"]0,175958643[/TD]
[TD]46[/TD]
[TD]47[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]49[/TD]
[TD="align: right"]0,948371839[/TD]
[TD]7[/TD]
[TD]48[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]50[/TD]
[TD="align: right"]0,343735137[/TD]
[TD]38[/TD]
[TD]49[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]51[/TD]
[TD="align: right"]0,604571472[/TD]
[TD]26[/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]52[/TD]
[TD="align: right"]0,834753212[/TD]
[TD]11[/TD]
[TD]51[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]53[/TD]
[TD="align: right"]0,738643848[/TD]
[TD]17[/TD]
[TD]52[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody><colgroup><col><col><col><col><col span="6"></colgroup>[/TABLE]

Sheet = Draws
In the culumns I have:
All formulas is dragged down
B =VLOOKUP(Calculations!E2;Calculations!$C$3:$D$54;2;FALSE)
C =VLOOKUP(Calculations!F2;Calculations!$C$3:$D$54;2;FALSE)
D =VLOOKUP(Calculations!G2;Calculations!$C$3:$D$54;2;FALSE)
E =VLOOKUP(Calculations!H2;Calculations!$C$3:$D$54;2;FALSE)
F =VLOOKUP(Calculations!I2;Calculations!$C$3:$D$54;2;FALSE)
G =VLOOKUP(Calculations!J2;Calculations!$C$3:$D$54;2;FALSE)

[TABLE="width: 256"]
<tbody>[TR]
[TD][/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]B[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1[/TD]
[TD]10[/TD]
[TD]26[/TD]
[TD]31[/TD]
[TD]37[/TD]
[TD]23[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]48[/TD]
[TD]20[/TD]
[TD]28[/TD]
[TD]25[/TD]
[TD]51[/TD]
[TD]18[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]45[/TD]
[TD]46[/TD]
[TD]38[/TD]
[TD]7[/TD]
[TD]52[/TD]
[TD]39[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]24[/TD]
[TD]14[/TD]
[TD]35[/TD]
[TD]34[/TD]
[TD]41[/TD]
[TD]29[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]33[/TD]
[TD]50[/TD]
[TD]4[/TD]
[TD]11[/TD]
[TD]43[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]32[/TD]
[TD]3[/TD]
[TD]12[/TD]
[TD]21[/TD]
[TD]30[/TD]
[TD]6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]9[/TD]
[TD]49[/TD]
[TD]44[/TD]
[TD]16[/TD]
[TD]27[/TD]
[TD]36[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]8[/TD]
[TD]2[/TD]
[TD]13[/TD]
[TD]47[/TD]
[TD]17[/TD]
[TD]42[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody><colgroup><col span="8"></colgroup>[/TABLE]
Thank you very much!!!!!!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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