|
|
try something like
sub noinc()
dim i(7) as integer
dim r as integer
dim c as integer
r=1
i(1)=1
for i(2) = I(1) to 5
for i(3) = i(2)+1 to 6
for i(4) = i(3)+1 to 7
for i(5) = i(4)+1 to 8
for i(6) = i(5)+ 1 to 9
for i(7) = i(6)+1 to 10
for c=1 to 7
cells(r,c)=i(c)
r=r+1
next i(7)
next i(6)
next i(5)
next i(4)
next i(3)
next i(2)
end sub
"Sweden" wrote:
Sweden!
OK I will make it easier to understand, what I want is a code in vba to
make those combinations:
Say 7 numbers 1 - 10
1 2 3 4 5 6 7
1 2 3 4 5 6 8
1 2 3 4 5 6 9
1 2 3 4 5 6 10
1 2 3 4 5 7 8
1 2 3 4 5 7 9
1 2 3 4 5 7 10
1 2 3 4 5 8 9
1 2 3 4 5 9 10
1 2 3 4 6 7 8
1 2 3 4 6 7 9
1 2 3 4 6 7 10
1 2 3 4 6 8 9
1 2 3 4 6 8 10
1 2 3 4 7 8 9
1 2 3 4 7 8 10
1 2 3 4 7 9 10
1 2 3 4 8 9 10
1 2 3 5 6 7 8
1 2 3 5 6 7 9
1 2 3 5 6 7 10
1 2 3 5 6 8 9
1 2 3 5 6 8 10
1 2 3 5 7 8 9
1 2 3 5 7 8 10
1 2 3 5 7 9 10
1 2 3 5 8 9 10
1 2 3 6 7 8 9
1 2 3 6 7 8 10
1 2 3 6 7 9 10
1 2 3 7 8 9 10
1 2 4 5 6 7 8
1 2 4 5 6 7 9
1 2 4 5 6 7 10
1 2 4 5 6 8 9
1 2 4 5 6 8 10
1 2 4 5 6 9 10
1 2 4 5 7 8 9
1 2 4 5 7 8 10
1 2 4 5 7 9 10
1 2 4 6 7 8 9
1 2 4 6 7 8 10
1 2 4 6 7 9 10
1 2 4 6 8 9 10
1 2 4 7 8 9 10
1 2 5 6 7 8 9
1 2 5 6 7 8 10
1 2 5 6 7 9 10
1 2 5 6 8 9 10
1 2 5 7 8 9 10
1 2 6 7 8 9 10
1 3 4 5 6 7 8
1 3 4 5 6 7 9
1 3 4 5 6 7 10
1 3 4 5 6 8 9
1 3 4 5 6 8 10
1 3 4 5 6 9 10
1 3 4 5 7 8 9
1 3 4 5 7 8 10
1 3 4 5 7 9 10
1 3 4 5 8 9 10
1 4 5 6 7 8 9
1 4 5 6 7 8 10
1 4 5 6 7 9 10
1 4 5 6 8 9 10
1 4 5 7 8 9 10
1 5 6 7 8 9 10
--
Sweden
------------------------------------------------------------------------
Sweden's Profile: http://www.excelforum.com/member.php...o&userid=27322
View this thread: http://www.excelforum.com/showthread...hreadid=468252
|