Lotto 6/55 Number Generator Spreadsheet

1 Flares 1 Flares ×

Following my Excel lottery number generator video I have had frequent requests for a Lotto 6/55 version. So here it is.

This spreadsheet demonstrates some fantastic Excel techniques, and as always the file is unprotected so that it can all be investigated.

The following Excel features are used:

  • The RAND function is used to generate the random numbers
  • The RANK and COUNTIF functions are used to rank the random numbers from 1 to 55 for retrieval of the balls
  • The Vlookup function is used to retrieve the ball numbers
  • Some VBA is used to perform the formula calculations when a button is clicked (Manual calculation has been chosen over automatic for the workbook)

Download the Lotto 6/55 number generator spreadsheet.

30 thoughts on “Lotto 6/55 Number Generator Spreadsheet

  1. I go through your Lotto 6/55 number generator, please tell me which way to activate the 6 button and the generator button. Thanks

    • The buttons function due to a Vlookup finding the number on the Calculation sheet.

      The button works as it runs a macro that performs calculations on the sheet. Press Alt + F11 to open the Visual Basic Editor and view the code that the button runs.

      This is necessary as Automatic Calculations have been switched to Manual Calculations on the sheet. This is done via the Formulas tab on the Ribbon.

      • why the button can not work …???
        can’t run the macro”lottery_number_generator.xlsm!lotery_draw.
        the macro may not be avaible in this workbook or all macros may disable

        • Sounds like the macros are disabled. In Excel 2010 a yellow message bar should appear with an Enable Macros button.

          Otherwise click the File tab > Options > Trust Center > Macro Security and then the required option to enable them.

  2. This is great, but I will like to know how to edit and modify the codes to work with 5/59 numbers.
    If you have the video that shows the steps please send me the link.


      • You Sir, As we Yanks say, Are Sh”#
        Hot! Not enough Thank Yous’. If by some chance – good fortune should be fall me as a result of your sharing this program – your wife / Significant Other / Honey Bun is going to be a happy person, As you will no doubt be sharing in my good fortune. :>)Semper Fi Followed you instructions to the letter and it works like a charm.

  3. can you help me, please, guys,how can i make a history for it? to see,for example, how many times was number 1. Please, very need it. thank you

  4. Hello, Mr Murray.

    What about if there is a requirement for a bonus number.?

    How do you go about it.??

    Thanks a lot for the help.


    Richard Lim

  5. What about if you already have the ranks for the lottery numbers? How can you generate the lottery? I tried using my state lottery ranking and the numbers will not generate.

  6. Hello Mr Murray,could you please help me adjust your spreadsheet to 5/90 number generator,i will so much appreciate it. Thank you

  7. Hi,

    It’s very interesting…

    Can you tell me if it’s possible to make a loterry with only some number presectionned please ?

    What kind of code can i do to make this possible ?

    Thanks in advance !


    p.s. Sorry for my text…

  8. Hello Mr Murray. Very elegant and nicely done. My question is how is possible to write every new calculation in different row in table on another sheet?
    Thank you and have a nice day!

  9. For example the Powerball and Mega Million have 5 numbers and 1 number generate separately from each drawing. Generating 6 numbers from each drawing to make up the bonus number will skew the result. What I did was to generate 5/75 and 1/15 for MM and 5/59 and 1/35 for PB from separate drawings in other not to skew the outcome. Please advice.

  10. gud day mr. murray,

    how about 3 digit..can you make it
    a 3 digit for me, because here in our
    country i always bet for 3 digit..

    tnx from Philippines..

Leave a Reply

Your email address will not be published. Required fields are marked *