Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   .NET Office Automation (http://www.xtremevbtalk.com/-net-office-automation/)
-   -   Lotto Permutations, Combinations (http://www.xtremevbtalk.com/-net-office-automation/328780-lotto-permutations-combinations.html)

dwrowe001 09-27-2017 04:21 PM

Lotto Permutations, Combinations
 
Hi,
Newbee to site needing help with coming up with code to generate numbers
for lotto picks...

I know nothing about VB, but I do know I need it to accomplish my needs. So I need help.

I have created a workbook in Excel 2016, with all the past draws for 5/60 lotto. 5 numbers picked out of 1 to 60.

I have formulas (I've gotten help with those also... sigh) which narrow down possible numbers for future draw.. and puts them in list which I have in on a worksheet named POOLS, in Column C, C2 down to C?? this list varies in length between 20 to 40 numbers, it just depends... and the numbers are random, not sequential.
example:

C
numbers
03
07
08
10
12
17
19
23
25
28
31
33
42
45
48
51
60

I would like help with coming up with code which would generate all possible combos from that list. I would like to have the ability to control how many are generated, like generate only 5, 10, 20 30 etc... what ever I put in.

Also I would like to be able to have a sum range, min and max sum range of the generated picks. Example if I put in Min: 100 Max: 125, only numbers within that range will be generated.

Lastly I would like the ability of entering static numbers in any of the 5 positions.. have 5 boxes(cells) for balls 1, 2,3,4,5. If I put a 5 in the first box, for ball 1, then all the generated numbers would start with 5.. If I put a 2 in position 1 and 55 in last position, then all generated numbers would start with 2 and end with 55.

I hope I haven't gone to far with my request?? I know that there are possibly other posts which address my needs, but as I said, I know absolutely nothing about VB coding and wouldn't know what the heck I was looking at or how to modify it to meet my specific needs. I would be eternally grateful to anyone who helps... Thank you!!!

Dave


All times are GMT -6. The time now is 06:20 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.