Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Sweden
 
Posts: n/a
Default Permutation in excel


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

  #2   Report Post  
bj
 
Posts: n/a
Default

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


  #3   Report Post  
Max
 
Posts: n/a
Default

You've got some responses at your multi-post
in microsoft.public.excel (& in .misc, too!)

Please do not multipost ..
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--


Reply
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
"Group" function very slow with Excel 2003 :( ... While very quick with Excel2000 :O) Alain79 Excel Discussion (Misc queries) 4 June 14th 05 07:34 AM
Stop Excel Rounding Dates leinad512 Excel Discussion (Misc queries) 1 April 20th 05 04:19 PM
Hints And Tips For New Posters In The Excel Newsgroups Gary Brown Excel Worksheet Functions 0 April 15th 05 05:47 PM
Excel error - Startup (and Acrobat PDFMaker) gxdata Setting up and Configuration of Excel 0 February 4th 05 03:44 AM
Excel 2002 and 2000 co-install. Control Which Starts ? cnuk Excel Discussion (Misc queries) 2 January 17th 05 08:07 PM


All times are GMT +1. The time now is 10:11 AM.

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"