LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Listing combinations in excel

In article ,
Raigmore wrote:

I want to list in excel all the possible combinations that could result
from these matches.

So it is just 3 to the power of 7.

I would like them listed as 0,0,0,0,0,0,0 then 0,0,0,0,0,0,1 etc etc.


[ except with 3 instead of 2 for the third possible digit ]

This doesn't need macros; it can be done with functions.

You'll be filling a 7-column by 2187-row block with these. What follows
assumes that the top left corner will be at cell B3, so the bottom right
corner is in cell H2189.

Fill the first row cells, B3 through H3, with zeroes.

Next, in the rightmost column, start at the second row of the block, cell
H4, and put in the formula:

=IF(H3=0,1,IF(H3=3,0,1))

and copy it down, so it fills every cell of that right column. This cycles
0,1,3 all down the column.

Now, put the following formula (which is similar to that one, but with a
prefix) in the top right still-empty cell, G4:

=IF(H40,G3,IF(G3=0,1,IF(G3=3,0,1)))

and copy that to all the remaining cells, B4 thru G2189.

If I didn't screw any of that up, you now have what I think you asked for.

--
Randy Hudson
 
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
Getting Excel to Calculate All Combinations of a Set of Data? marello Excel Worksheet Functions 11 May 1st 23 03:42 AM
Can excel list combinations BOJO Excel Worksheet Functions 1 July 26th 07 12:26 AM
Combinations from group in Excel [email protected] Excel Programming 0 January 6th 06 01:54 PM
Excel combinations from groups [email protected] Excel Discussion (Misc queries) 0 January 6th 06 01:53 PM
Generating excel combinations mark4006 Excel Discussion (Misc queries) 2 March 6th 05 04:40 PM


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