winsumloosesum's Blog
- winsumloosesum's Blog has 154 entries (0 private) and has been viewed 80,345 times.
- Lottery Post members have made 46 comments in winsumloosesum's Blog.
- winsumloosesum is a Platinum member
August 27, 2010, 10:15 pmGood-Bye Lotterypost Members
This is to inform all of you that I will no longer be posting here at LP.
Good-Bye!!
August 10, 2010, 12:14 pmExcel VBA - Generate Pairs & Trips to a Text File
1. Create a new folder on your C: Drive and name it Lotto543 (c:\Lotto543)
2. Open Excel and right-click any Tab at the bottom and select "ViewCode"
3. When the Window opens go to the top Main Menu and select > Insert > Module
4. Copy and paste the following code into the right workspace where you see the blinking cursor.
Sub Generate43C2()
Open "c:\Lotto543\L543.txt" For Output As #1
For i1 = 1 To 43 - 1
For i2 = i1 + 1 To 43 - 0
LexiNum = LexiNum + 1
Print #1, Format(LexiNum, "000") & " " & Format(i1, "0") & "," & Format(i2, "0")
Next
Next
Close #1
End Sub
=======================================================================
This generates all 903 Pairs for the 5/43 Lottery Game to a text file named L43.txt located at C:\Lotto543
If your drive designation is different from "C:\" then you will need to change the following code to reflect the code:
For example if your drive designation is the letter D:\ you would change th following line of code to the following:
Open "d:\Lotto543\L543.txt" For Output As #1
============================================================================
If your Lottery Game is a 5/39 game you can change or create a new folder and name the folder c:\Lotto539
and change the following code:
Sub Generate39C2()
Open "c:\Lotto539\L539.txt" For Output As #1
For i1 = 1 To 39 - 1
For i2 = i1 + 1 To 39 - 0
LexiNum = LexiNum + 1
Print #1, Format(LexiNum, "000") & " " & Format(i1, "0") & "," & Format(i2, "0")
Next
Next
Close #1
End Sub
=======================================================================
The "LexiNum" is actually the Lexicographic Pairs designation number.
The Excel formula for calculating the number of pairs in your lottery game is =COMBIN(43,2) where "X" is the total number of balls (43) and "N" is the number of digits = 903 for a 5/43 game
or =COMBIN(39/2) = 741 Pairs for a 5/39 lottery game.
=======================================================================
For creating 3 Number Combinations (9,139) for a 5/39 Game =COMBIN(39,3). This code below will generate all 9,139 trips to your folder C:\Lotto539. If you open the folder you should see a text file L539Trips.txt inside the folder. Remember to create your new folder c:\Lotto539 first before running the code.
Sub Generate39C3()
Open "c:\Lotto539\L539Trips.txt" For Output As #1
For i1 = 1 To 39 - 2
For i2 = i1 + 1 To 39 - 1
For i3 = i2 + 1 To 39 - 0
LexiNum = LexiNum + 1
Print #1, Format(LexiNum, "000") & " " & Format(i1, "0") & "," & Format(i2, "0") & "," & Format(i3, "0")
Next
Next
Next
Close #1
End Sub
======================================================================================
Good Luck!!
Last Edited: August 10, 2010, 12:14 pm
April 30, 2010, 10:59 pmPick 3 - Pick 4 - Pick 5 - Pick 6 Excel Formulas
Pick 3, Pick 5, Pick 5, and Pick 6 combinations to separate cells - formulas

April 24, 2010, 9:44 amExcel - Creating Pick 3 and Pick 4 Combinations VBA
Below is a link for creating 1,000 Pick 3 combinations and 10,000 Pick 4 combinations:
http://www.box.net/shared/t9ktq6klm5
Thanks to GillesD at lotto649 forum.
=====================================================
Pick 4 Code:
Option Explicit
Dim A As Integer, B As Integer, C As Integer, D As Integer
Dim X As Double
Sub CombininationsPick4()
Columns("A:E").Select
Selection.ClearContents
Range("G1").Select
' Generates all combinations for a pick-4 lottery
Range("A1").Select
X = 1
For A = 0 To 9
For B = 0 To 9
For C = 0 To 9
For D = 0 To 9
ActiveCell.Offset(X, 0).Value = X
ActiveCell.Offset(X, 1).Value = A
ActiveCell.Offset(X, 2).Value = B
ActiveCell.Offset(X, 3).Value = C
ActiveCell.Offset(X, 4).Value = D
X = X + 1
Next D
Next C
Next B
Next A
End Sub
===============================================
Pick 3 Code:
Option Explicit
Dim A As Integer, B As Integer, C As Integer
Dim X As Double
Sub CombininationsPick3()
Columns("A:D").Select
Selection.ClearContents
Range("G1").Select
' Generates all combinations for a pick-3 lottery
Range("A1").Select
X = 1
For A = 0 To 9
For B = 0 To 9
For C = 0 To 9
ActiveCell.Offset(X, 0).Value = X
ActiveCell.Offset(X, 1).Value = A
ActiveCell.Offset(X, 2).Value = B
ActiveCell.Offset(X, 3).Value = C
X = X + 1
Next C
Next B
Next A
End Sub
===========================================================
April 17, 2010, 8:39 amExcel File - Lottery Positions - Totals By Digit By Position
Below is a download link to an Excel file that will show how many times a certain digit appears in a position for a particular lottery.
http://www.box.net/shared/bj59rq4laf

In the image above you can see that the Digit 1 (Cell D5) appears a total of 111930 times (Cell E5) in Position 1 (Cell E4)
You can change the number of balls drawn in your lottery in cell D2 (5) and the total number of balls in your lottery in cell D3 (43)
The maximum value you can enter in cell D2 is 10 and the maximum value you can enter in cell D3 is 80
In cell D1 (962,598 combinations) will display the total number of combinations for your lottery.
This matrix does not account for lotteries with bonus draws i.e. Powerball and Mega Millions.
Last Edited: April 17, 2010, 9:32 am
April 16, 2010, 7:43 pmExcel File - Calculate Combinations From Sums
Here is a cool Excel file that will generate combinations based on the Sum you request.
Thanks to GillesD at Lotto649 for the code.
Download link:
http://www.box.net/shared/zv69zkn75e
The example below is using the 5/59 game with no bonus ball and selecting the Sum 150 (52662 total combinations)

You can change the Sum 150 (see image above) to any number between 15 and 285
You can also change the number 55 through 59 to your Pick 5 game. e.g. 5/43
April 15, 2010, 9:11 amExcel File - Calculate Lottery Sums and Combinations
Thanks to a member of lotto649ws for providing the VBA Code for this file.
Here is the download link:
http://www.box.net/shared/esa76kfd1b
To change the VBA Code just right-click on either the "Sums5" or "Sums6" Tab (see below)

Then click "view code"

The VBA window will open.
In the right side locate the "Modules". Click the small "+" sign to expand the files

Double click the "Module 1"

In the right hand side of the window you will see the following code:

If you want to change the parameters from a Lottery game that uses a 6 / 39 game to a new 6 digit game you will need to change the code above.
So for example, if you wanted to change the 6/39 game to a 6/43 game you would need to know the Sums values of 1, 2, 3, 4, 5, 6 and 43, 42, 41, 40, 39, 38
Go to the Tab labeled Sums6 (6 draw game) and scroll over to cell range L2 through Q2 and enter the numbers 43 through 38 in cells L2 thorugh Q2. You see the totals in cells R1 and R2 of 21 and 243.
Next, go to the code window (see image abobe and change the following lines:

Next, we need to change the following values:

Save your work by clicking the Save icon.

Next, close the Code Window
Click the Tab labeled "Sums6" and select cell columns A and B to highlight both columns and then click the delete key on your keyboard. This will delete the calculations.
Go to the main menu at the top and select > Tools > Macros > Macro
A window will open and you will see 2 macros to choose from:

Select "SumAll6" macro and on the right side click the "Run" button
The new calculations will appear in cell columns A and B

The "Total Number of Combinations" will appear in cell G1 and also the highest number of combinations for a Sum in cell G2.
You can scroll down cell column B2 to locate the highlighted combinations and corresponding Sum from cell G1 and G2.
Good Luck!!
Last Edited: April 15, 2010, 9:12 am
April 13, 2010, 1:10 pmExcel Formula - Count Number Even & Odd in Cell Range
These Excel formulas will count the number of Even Numbers and Odd Numbers in a cell range.
For example: Pick 3
You have Position 1 (A1), Position 2 (B1), Position 3 (C1)
Enter the following formula in cell D1 to count the number of "Even Digits in cell range A1 through C1
=COUNT(A1:C1)-SUMPRODUCT(MOD(A1:C1,2))
Enter the following formula in cell E1 to count the number of "Odd Digits in cell range A1 through C1
=SUMPRODUCT(MOD(A1:C1,2)) ODD
April 12, 2010, 2:12 pmSume of Digits In 1 Cell
Using the Morefunc Add-In formula for Excel 2002:
=EVAL(SUBSTITUTE(A1,"-","+"))
Where cell A1 has the following: 1,2,3,4,5
Sum would equal 15
Google "Morefunc" English version to download Free Morefunc Add-In
March 3, 2010, 5:29 pmCool Website with Excel Programs
Found this website with cool Excel programs:
https://sites.google.com/a/madrocketscientist.com/jerrybeaucaires-excelassistant/files
January 15, 2010, 10:58 amInstructions For Updating Excel File P3StateDraws.xls
Below are instructions in Word and Pdf format on how to update the excel file "P3StateDraws.xls".
The Word doc and Pdf have the exact same instructions. Their is a download link in both the Word doc and Pdf for the Excel file P3StateDraws.xls for those who are interested.
The main purpose I created this excel file is to have a history of all Pick 3 drawings for each state. Hopefully in the near future we can place online bets. For those who live in a country that allows online betting maybe this file will help. If you have a good handle on using Excel you can create other workbooks for analyzing the Pick 3 games and use the draw history from this Excel file.
The Excel file is version 2002 so I don't know how it will behave in other versions newer or older.
Word doc download link:
http://www.box.net/shared/vzfozaucc5
PDF doc download link:
http://www.box.net/shared/36i199rsbj
Excel file download link in both the Word doc and PDF:
http://www.box.net/shared/liqqovu76y
Post any questions or comments!! (or PM me)
I will update my copy of the Excel file P3StateDraws.xls file and post the download links in the comments of this blog posting.
Good Luck!!
Last Edited: January 15, 2010, 11:00 am
January 7, 2010, 8:09 amUpdated Drawings Excel File - Neighbors Program
Updated Pick 3 drawings through Jan 6 2010
Replace exisiting excel file with this one:
January 6, 2010, 8:08 amThanks to DavidT
This is a thank you to DavidT from Compulotto and as a member of the old lottery forum "eLotteryUniverse".
The "neighbors" and "VTRAC" Excel files was David's idea. I just modified it a bit.
Again the thanks goes to DavidT for explaining VTRACs a number of years ago.
January 6, 2010, 8:02 amDrawing Update Jan 6 2010
Download link to zip file for "Pick 3 drawings fro Pick 3 Neighbors System":
Download zip file > Unzip Excel file to your folder "Pick3NeighborsSystem" > When prompted YES to replace existing file.
January 4, 2010, 7:27 amUpdate To State Drawings Excel File Jan 3 2010
Download link to zip file containing "P3StateDraws.xls" Excel file for "Pick 3 Neighbors System" folder.
Contains updates to drawings from Sunday Jan. 3, 2010
Download zip file > Unzip into Pick3 Neighbors System Folder > Click YES when prompted tot replace exisitng file.
http://www.box.net/shared/pt3kfohbl4
Good Luck!!



