• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Get list of value combinations

Costas

Member
Hi Chandoo,

I have a list of values and want to create a list of their combinations with an option to vary the grouping. For example a list of 10 values with a grouping of 6 has 210 combinations.

I'm after a list of the 210 and an option to change the 10 or the 6.

I found code to combine values from two lists but not within the one list.

I'm guessing the solution would involve a series of loops but haven't figured out how to go about it. I attach my excel for more info. The combinations shown have been manually entered as an example

Thanks
Costas
 

Attachments

Hi Hui and thanks for the link.

I think the most relevant in my case is section 3.3 Combinations without repetition. I've downloaded the two example spreadsheets but find it difficult to modify them to suit my needs.

Is there any simpler way through vba?

Thanks
Costas
 
Back
Top