Any Excel VBA or Excel functions that can help with general lottery forecasting?


New Member
Permission to post, admins...

Mostly the posts here about the lottery concern with random number generation, with pick-3 games and with lotteries dealing with huge numbers (e.g. 5 out of 90). I am only concerned with general, simple lottery forecasting concerns.

So, I'm wondering if anyone here knows some VBA formulas for the following tasks:
a) Counting the frequency of each number in a lottery game

b) Determine which are "hot" numbers, "cold" numbers and "overdue" numbers within a certain draw period in a lottery game

c) Know how many times a number is paired with another number

Hope you would consider helping me out in this...


MrExcel MVP, Moderator
While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.


New Member
Reply intended for Kyle123: Since I couldn't edit my original post, I included a note explaining why... It had something to do with some misunderstanding with the other forum and was badly in need of answers. If any original idea comes up here, the other guys will know...

To admins: sorry if this post peeved you. Just wanted to make sure somebody will give ideas to my concern....


New Member
Reply for joeu2004:
Interesting. So, does that mean the usual way of forecasting lottery won't apply to the 6/59 game?

By the way, any idea what VBA formula or Excel function to use to get "hot", "cold" and "overdue" numbers?
No other site I looked into gives any idea as to how... :confused:


Well-known Member
does that mean the usual way of forecasting lottery won't apply to the 6/59 game?
First, my previous comment was specific to the UK lotto game. If you are not interested in the UK lotto game per se, ignore my comments.

Second, I hope you know that there is no reliable way to "forecast" or predict the outcome of any specific lottery drawing.

And none of the statistics like the ones at will improve your odds of matching a specific drawing.

(The only way to improve your odds of matching is to purchase more tickets, each of which is different.)

That said, you have to pick 6 numbers from 1-to-59 somehow. And any method is as good as another, because all combinations (tickets) have the same probability of matching a specific drawing.

My previous comment relates to the fact the UK lotto changed from 6/49 to 6/59 after 8 Oct 2015 (Thu).

But the statistics at cover "20 years". (Actually, apparently at least back to 27 Dec 1995.)

Consequently, some statistics are misleading.

For example, the 6 least-often drawn numbers are all in the 50s because those numbers were available to be drawn only in the last 400 of the 2465 drawings that are covered by the statistics. Well, duh!

For the same reason, the total frequency of the numbers in the 50s are significantly lower than 1-to-49.

In fact, IMHO, the only valid statistic is the "most overdue numbers", since that seems to mean only the most number of days since last drawn.

any idea what VBA formula or Excel function to use to get "hot", "cold" and "overdue" numbers?
It is certainly doable. Some statistics can be calculated with Excel formulas alone. Some are best done using VBA procedures.

Before anyone can help you, you need to specify the lotto that you are interested in, or its parameters.

Such calculations are fun. But I'm afraid that I should not take the time to participate.

Good luck!

Some videos you may like

This Week's Hot Topics

  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • find many based on a certain criteria
    good evening, I hope someone can help me? I have a workbook sheet 2 contains lots of data.... I would like to be able to find anything on sheet...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
  • Text Format
    I have a sheet for user to keyin the data. The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099. The number after the "/" is...
  • Syntax errors
    Good Morning, Trying to compile a workbook, I keep getting a few errors. Here are the first two: [code=rich]Syntax Error: Function...