VBA program for all combinations
The small VBA program listed below will generate all 13,983,816 combinations on a sheet in Excel. Each column will have 65,000 combinations of 6 numbers separated by a -. At the end, you should have 216 columns with data for you to analyze.
The program works fine on my computer but I do not guarantee it will work everywhere. And it is not optimized for speed, nice looking data, or anything else.
The program must be inserted into module in your workbook. See Excel documentation for hot to do this. Then copy the program (I suggest cut and paste to reduce errors in entering text) in the module. Place the cursor in a blank sheet in Excel and start the List_Comb program with Tools, Macro ….
The other possibility would be for me to send the spreadsheet to LT who could forward to you or anybody else that would interested. The user would only need to start the macro to get all combinations (if enough memory is available, of course).
The listing for the program is:
Option Explicit
Dim A As Integer, B As Integer, C As Integer, 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 44
For B = A + 1 To 45
For C = B + 1 To 46
For D = C + 1 To 47
For E = D + 1 To 48
For F = E + 1 To 49
N = N + 1
If N = 65001 Then
N = 1
ActiveCell.Offset(-65000, 1).Select
Application.ScreenUpdating = True
Application.ScreenUpdating = False
End If
ActiveCell.Value = A & "-" & B & "-" & C & "-" & D & "-" & E & "-" & F
ActiveCell.Offset(1, 0).Select
Next F
Next E
Next D
Next C
Next B
Next A
Application.ScreenUpdating = True
End Sub