I adapted this from another forum as originally presented by Gilles D.
This is a vba program that will list all combos, provided it doesn't run out of mempry or cell address spaces...
Instructions per Gilles D...
1 - Open a worksheet and then a module in VBA (Alt-F11)
2 - Cut and paste the program I posted into that module
3 - Go back to the worksheet and start the program List_Comb
4 - Wait a few minutes (less than 2 on mine) and you will get all 165,772 combinations in columns A, B and C. <<< here is where your version will take alot longer and use more columns...
Here is your modified program... use autofit to arrange the data for viewing after it's done... it WILL overlap....
CUT BELOW THIS LINE....
Option Explicit
Dim A As Integer, B As Integer, C As Integer
Dim D As Integer, E As Integer, F As Integer
Dim N As Long
Sub List_Comb()
Range("A1").Select
Application.ScreenUpdating = False
N = 0
For A = 1 To 40
For B = A + 1 To 41
For C = B + 1 To 42
For D = C + 1 To 43
For E = D + 1 To 44
For F = E + 1 To 45
ActiveCell.Value = A & "-" & B & "-" & C & "-" & D & "-" & E & "-" & F
ActiveCell.Offset(1, 0).Select
N = N + 1
If N = 65001 Then
N = 0
ActiveCell.Offset(-65001, 1).Select
Application.ScreenUpdating = True
Application.ScreenUpdating = False
End If
Next F
Next E
Next D
Next C
Next B
Next A
Application.ScreenUpdating = True
End Sub
CUT ABOVE THIS LINE
Good Luck and welcome to Lottery Post!