• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How can be predict numbers

aceevropa

New Member
Dear,
how can be create a Macros program which will predict next lotto number based on past lotto numbers

for example the number are from 1-37
the last 5 draws are :

5182630343637
361011252627
1111324252635
391316293334
5131819232533
:awesome:
Thanks in advance!:)
 
This is the best predictor of the next lottery numbers:
Code:
Sub BestPredictor()
Dim Predictions(1 To 7)
For i = 1 To 7
  Do
    x = Application.RandBetween(1, 37)
    y = Application.Match(x, Predictions, 0)
  Loop Until IsError(y)
  Predictions(i) = x
Next i
MsgBox Join(Predictions, ", ")
End Sub
 
This is the best predictor of the next lottery numbers:
Code:
Sub BestPredictor()
Dim Predictions(1 To 7)
For i = 1 To 7
  Do
    x = Application.RandBetween(1, 37)
    y = Application.Match(x, Predictions, 0)
  Loop Until IsError(y)
  Predictions(i) = x
Next i
MsgBox Join(Predictions, ", ")
End Sub
thanks a lot!
 
Hi,​
you forgot to elaborate what could be your expected result, your strategy, the logic to follow, …​
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
 
it's running but the numbers which come out doesn't match with numbers drawn .
The goal is for at least 4/7 numbers to be hit. With your code, score is 0/7.
You will not find a better predictor than this. It takes into account the influence of all the previous lottery outcomes.
 
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
These are just some stats but what is the link with some prediction ? …​
A bit like post #3 but doing more of a scientific illusion with this VBA demonstration the five last draws must be within the cells range A1:G5 :​
Code:
Sub Demo1()
    Dim S, V, P%, N%
        S = ThisWorkbook.Saved
    With Application
       .ScreenUpdating = False
    With [J1:K37].Columns
       .Item(1).Value2 = [ROW(1:37)]
       .Item(2).Formula = "=COUNTIF($A$1:$G$5,J1)"
       .Sort .Item(2), 2, Header:=2
        V = .Item(1).Value2
       .Clear
    End With
        ThisWorkbook.Saved = S
       .ScreenUpdating = True
        Rnd -1:  Randomize V(1, 1)
    For P = 1 To 7
        N = Fix((38 - P) * Rnd) + P:  S = V(P, 1):  V(P, 1) = V(N, 1):  V(N, 1) = S
    Next
        MsgBox Join(.Small(.Index(V, [ROW(1:7)]), [COLUMN(A:G)]), " - "), , "Predict'one"
    End With
End Sub
Do you like it ? So thanks to click on bottom right Like !
 
You are gambling when you play roulette recklessly, such as by picking numbers. Whether it's black or white, odd or even. Numbers that are high in comparison to those that are low. Thank you for presuming, on behalf of the casino, that this game was about picking the right numbers. Thank you for purchasing your burger and fries from one of the 130+ restaurants/fast food joints/food trucks/dives that provide far superior burgers than Ray Kroc could have imagined.
 
Back
Top