# Permutation

1. ## Permutation

Hello All,

I am trying to figure out permutations (never worked with before). I have two #'s, 0 and 1, and I am trying to understand how many different combinations I can have accross 6 columns.

Example:

0,0,0,0,0,0
0,0,0,0,0,1
0,0,0,0,1,1
1,0,0,0,0,0
1,1,0,0,0,0

I have tried the combination formula, but for my business needs, order matters. Any assitantce pointing me in the right direction would be appreciated.

Thanks,
Alec  Register To Reply

2. ## Re: Permutation

If you have 6 places then you have 2^7 different combinations = 128 combinations (000000 to 111111)

You can see them all by, in cell A1 of blank sheet, putting the formula:

=DEC2BIN(ROW()-1)

And copying it all the way down to row 128.

Edited to add: I shouldn't do maths when I'm tired - you'll have 2^6 combinations = 64, so only copy the formula down as far as row 64.  Register To Reply

3. ## Re: Permutation

Hey Andrew,

Thanks I have never seen the "DEC2" formula before. Interesting way about going about it...but that formula does not have a combination like 0,0,0,0,0,0 or 0,0,0,0,0,1.  Register To Reply

4. ## Re: Permutation

Sorry, I really wasn't on my best form last night.

If you change the formula to:

=DEC2BIN(ROW()-1,6)

Then you should see all of the combinations you need.  Register To Reply

5. ## Re: Permutation

And if you want commas between each digit you can do this:

=LEFT(SUBSTITUTE(SUBSTITUTE(DEC2BIN(ROW()-1,6),"0","0,"),"1","1,"),11)

then copy down.

Hope this helps.

Pete  Register To Reply

6. ## Re: Permutation

Andrew/Pete,

Thanks, yes that gave the required data set. The help is appreciated.

Happy Holidays.

-Alec  Register To Reply