Euromillions Lottery Checker

  pj123 14:01 30 Jan 2007
Locked

I run a Lottery syndicate and have done since the start. I have written a Lottery checker in Excel which all I need to do is enter the drawn numbers and it gives me any winning tickets.

I have now just started a syndicate for the Euromillions lottery. I thought it would just be a case of amending the existing checker to include the 2 stars. Can't seem to get it to work. It will check the first star but not the second.

What I have for the UK lottery is:

Sub lottery_check()

'SYNDICATE ONE
drawn_row = 27

For drawn_column = 3 To 8

drawn_number = Worksheets(1).Cells(drawn_row, drawn_column).Value

For check_column = 3 To 8

For check_row = 3 To 23

check_number = Worksheets(1).Cells(check_row, check_column).Value

If check_number = drawn_number Then
Worksheets(1).Cells(check_row, check_column).Interior.ColorIndex = 17
End If

Next check_row

Next check_column
For check_column = 11 To 16


For check_row = 3 To 23

check_number = Worksheets(1).Cells(check_row, check_column).Value
If check_number = drawn_number Then
Worksheets(1).Cells(check_row, check_column).Interior.ColorIndex = 17

End If

Next check_row

Next check_column
For check_column = 19 To 24

For check_row = 3 To 23

check_number = Worksheets(1).Cells(check_row, check_column).Value
If check_number = drawn_number Then
Worksheets(1).Cells(check_row, check_column).Interior.ColorIndex = 17

End If
Next check_row

Next check_column
For check_column = 27 To 32

For check_row = 3 To 23

check_number = Worksheets(1).Cells(check_row, check_column).Value
If check_number = drawn_number Then
Worksheets(1).Cells(check_row, check_column).Interior.ColorIndex = 17

End If
Next check_row
Next check_column
Next drawn_column

'BONUS NUMBER

drawn_column = 9
drawn_number = Worksheets(1).Cells(drawn_row, drawn_column).Value
For check_column = 3 To 8

For check_row = 3 To 23

check_number = Worksheets(1).Cells(check_row, check_column).Value

If check_number = drawn_number Then
Worksheets(1).Cells(check_row, check_column).Interior.ColorIndex = 4

End If

Next check_row

Next check_column

For check_column = 11 To 16

For check_row = 3 To 23

check_number = Worksheets(1).Cells(check_row, check_column).Value
If check_number = drawn_number Then
Worksheets(1).Cells(check_row, check_column).Interior.ColorIndex = 4

End If

Next check_row

Next check_column

For check_column = 19 To 24

For check_row = 3 To 23

check_number = Worksheets(1).Cells(check_row, check_column).Value
If check_number = drawn_number Then
Worksheets(1).Cells(check_row, check_column).Interior.ColorIndex = 4

End If

Next check_row

Next check_column
For check_column = 27 To 32
For check_row = 3 To 23
check_number = Worksheets(1).Cells(check_row, check_column).Value
If check_number = drawn_number Then
Worksheets(1).Cells(check_row, check_column).Interior.ColorIndex = 4

End If
Next check_row

Next check_column


End Sub

This covers the 6 drawn and the bonus ball for 84 tickets.

Euromillions is only 5 main numbers plus two Star numbers. I tried to modify the checker so that the 6th number became the first star number and added an extra column to accommodate the 2nd star number. Although the checker works OK it doesn't actually flag up the 2nd star number.

The checker for the UK lottery shows all drawn numbers in blue and the bonus number as green.

Can someone help me modify this checker please?

Thanks

  pj123 14:06 30 Jan 2007

By the way, this entry covers 36 tickets and guarantees both Star numbers will be drawn every week. That means you only need one number in the main draw to win something.

  GANDALF <|:-)> 14:26 30 Jan 2007

'this entry covers 36 tickets and guarantees both Star numbers will be drawn every week.'..and your winnings so far are?

G

  pj123 14:42 30 Jan 2007

GANDALF <|:-)>, nothing at the moment because it is not up and running live. But that wasn't the question. But I have to say that our syndicate winnings on the UK Lottery since November 1994 have amounted to £19,063 shared between 28 people.

OK, so we haven't won the Jackpot so Don't knock it.

  pj123 21:06 02 Feb 2007

Still struggling with this problem. Can anyone help please?

Thanks.

  VoG II 21:11 02 Feb 2007

I'm happy to help but I know nothing of the criteria. If you can set these down then I can check how your code tallies. A few examples and expected results (in Excel) would help.

  pj123 21:20 02 Feb 2007

Thganks VoG™. Can I email you the standard Lottery checker I am using? and the one I am trying to modify?

  pj123 18:59 03 Feb 2007

With some perseverance I think I have solved the problem.

VoG™, is very kindly looking at it and, hopefully, will confirm it is OK.

Ticked.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Fujitsu Lifebook P727 laptop review

Converse's new logo: the trainer brand looks to its heritage for a fresh identity

Mac power user tips and hidden tricks

Comment lancer Windows 10 en mode sans échec ?