Martin,
File uploaded now.
Thanks
Err_Q_28233532:
lngErr_Number = Err.Number
If Err.Number = -2147352565 Or Err.Number = 9 Then
ThisWorkbook.Worksheets.Add After:=Worksheets(Worksheets.Count)
ActiveSheet.Name = "Numbers_" & CStr(lngNumbers)
Resume Next
End If
strErr_Description = Err.Description
On Error Resume Next
Application.ScreenUpdating = True
Beep
MsgBox "Error #" & CStr(lngErr_Number) & _
vbCrLf & vbLf & _
strErr_Description, _
vbExclamation Or vbOKOnly, _
ThisWorkbook.Name
Resume Exit_Q_28233532
End Sub
Martin,
The goal is to limit the combinations to only those that match the first number in each row at B10:B19 and to name each sheet with that number.
I will attach the original file that works.
Martin,
The code does rename pages but it fails to stop when combinations for the first number are complete.
See picture
Also, it makes a "sheet12" then when run again "sheet11". If these are used during processing they should be deleted as it may cause undesired operation and overhead. (See bottom of picture).
The idea is to slowly build on the current code so I need it as clean and as little overhead as possible.
Yes, they can be eliminated as long as it can be eliminated without affecting the outcome.
I believe it’s part of the original code that asked for 1) the source of the data, 2) the destination of the sets, and 3) the number of cells in a set.
it’s been automated to 1) pick from B10:AG19, 2) make new sheets for each set and 3) 5 cells in each set.
Martin,
Looks like it will work. A bit more testing and I'll know better. I get an error if I use less than 32 numbers in each row, but no worries there. I've corrected that.
The real question is:
since it only makes combinations with one common number, can it handle up 70 numbers ?
If not 70 then what is the maximum total numbers it can make combinations with?
can it handle up 70 numbers ?Give it a try, The worst that can happen is that it crashes or hangs up.
It does not work with the current macro. There must be some sort of limit. I'll open another question and close this one.