Welcome Guest
The time is now 8:06 am
You last visited January 19, 2017, 7:50 am
All times shown are
Eastern Time (GMT-5:00)

# Excel File - Calculate Lottery Sums and Combinations

Published:

Last Edited: April 15, 2010, 9:12 am

Thanks to a member of lotto649ws for providing the VBA Code for this file.

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!!

Entry #148