Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Factorial macro or formula.

Captain Snuggles wrote:
Here's what I want to do. I have 6 numbers (1, 2, 3, 4, 5 and 6) and I
need to break these six numbers into sets of 3 so that each number is
grouped with 2 other unique numbers with no repeat numbers. So, you
can't pair 1,1,1 or 1,12, each number has to be unique. There should
be 120 different sets of numbers, but I can't find a macro or formula
to do this. Any ideas?
Ideally I'd like it to look like this:
1,2,3
1,2,4
1,2,5
1,2,6
1,3,4
1,3,5...and so on.


Another play to tinker with ..

Here's a link to a sample book with Myrna Larson's sub implemented:
http://savefile.com/files/1635536
MyrnaLarson_Combination_Permutation.xls

In Sheet1, just make the settings as:

Put in A1: P
Put in A2: 3

List the 6 items in A3:A8, viz. in this instance,
list the 6 numbers: 1,2,3,4,5,6

Then select A1, and click the button "ListPermutations"

The 120 permutations of 3 from 6 [i.e.: =PERMUT(6,3)]
will be listed in a new sheet to the left
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

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
is it posible to have a formula for factorial via vba code? thread Excel Worksheet Functions 4 August 29th 14 11:02 AM
Factorial question M.M Excel Worksheet Functions 6 June 8th 09 04:33 PM
Factorial Listing Branson Excel Discussion (Misc queries) 3 June 6th 08 04:18 PM
largest factorial that can be computed Loane Sharp[_2_] Excel Programming 3 August 15th 05 09:34 AM
Help? Inverse factorial? 43fan Excel Programming 5 December 30th 03 06:25 PM


All times are GMT +1. The time now is 11:55 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"