LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Combinations Sequence

Run this macro. It will make a CSV file that can be imported into Excel:

Sub CreateAfile()
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("c:\combins.csv", True)
For i = 1 To 10
For j = 1 To 10
For k = 1 To 10
For l = 1 To 10
For m = 1 To 10
For n = 1 To 10
v = i & "," & j & "," & k & "," & l & "," & m & "," & n
a.WriteLine (v)
Next
Next
Next
Next
Next
Next
a.Close
End Sub

--
Gary''s Student - gsnu200781


"Paul Black" wrote:

Hi,

I would like to be able to list all the sequences of numbers using six
criteria.
The easiest way to explain it would be to say there are six jars, with
each jar containing anything from 1 to 10 counters.
Ideally I would like a list of all the sequences. So for example ...

10 09 07 03 02 05
10 08 07 05 01 09
01 03 08 10 04 10

... etc.

If it helps, I could put the actual counters that are in each jar in
cells A1:F1.
I know that the list will be quite long depending of the number of
counters in each jar.
The first combination would go in cells A3:F3, the second in cells
A4:F4 etc, etc.

Thanks in Advance.
All the Best
Paul

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
all possible combinations. Gaurav[_4_] Excel Discussion (Misc queries) 4 March 19th 09 06:15 PM
combinations PST Excel Programming 0 April 10th 07 06:44 PM
Possible Combinations Please HELP!!! Excel Discussion (Misc queries) 1 January 6th 06 03:58 PM
getting combinations vecky New Users to Excel 1 January 1st 06 12:37 AM
Combinations Don Lloyd Excel Programming 2 June 29th 05 07:14 AM


All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"