Results 1 to 8 of 8

Please help to.modify the code to Possible 7/1-49 Lottery Number Combinations

Threaded View

  1. #1
    Registered User
    Join Date
    07-11-2011
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    22

    Please help to.modify the code to Possible 7/1-49 Lottery Number Combinations

    Dear all expert

    Does anyone can know how to generate all lotto 7/49 combinations ? i saw many website, still cannot find the vba code, the most closest one is

    Option Explicit
    Dim A As Integer, B As Integer, C As Integer, D As Integer
    Dim E As Integer, F As Integer, G As Integer, N As Long
    Sub List_Combinations_27()
    Range("A1").Select
    Application.ScreenUpdating = False
    N = 0
    For A = 1 To 21
    For B = A + 1 To 22
    For C = B + 1 To 23
    For D = C + 1 To 24
    For E = D + 1 To 25
    For F = E + 1 To 26
    For G = F + 1 To 27
    N = N + 1
    If N = 65001 Then
    N = 1
    ActiveCell.Offset(-65000, 8).Select
    End If
    ActiveCell.Offset(0, 0).Value = A
    ActiveCell.Offset(0, 1).Value = B
    ActiveCell.Offset(0, 2).Value = C
    ActiveCell.Offset(0, 3).Value = D
    ActiveCell.Offset(0, 4).Value = E
    ActiveCell.Offset(0, 5).Value = F
    ActiveCell.Offset(0, 6).Value = G
    ActiveCell.Offset(1, 0).Select
    Next G
    Next F
    Next E
    Next D
    Next C
    Next B
    Next A
    Application.ScreenUpdating = True
    End Sub
    Does any expert can vary this to All Possible 7/1-49 Lottery Number Combinations. The total is 13983816 combination. Thank you very much.

    Thanks in advance,
    Isaac
    Last edited by Isaacliu; 12-07-2016 at 01:17 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Lottery: Combinations of 6 numbers in a range of number 1 - 60
    By Baroem in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-02-2020, 04:49 PM
  2. [SOLVED] Geting highest number value from list with values which are text/number combinations
    By igormigor in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-25-2016, 10:48 AM
  3. Permutations/Combinations with Lottery
    By ablan008 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-18-2016, 12:07 AM
  4. Replies: 3
    Last Post: 09-15-2015, 03:00 AM
  5. Assign random number for a lottery
    By Alibuchan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-11-2013, 10:35 PM
  6. [SOLVED] Pick 3 Lottery Number Macro
    By ssjagger in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-28-2013, 11:20 AM
  7. Lottery Number Checking
    By madnesstiger in forum Excel General
    Replies: 5
    Last Post: 02-15-2007, 07:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1