Link to home
Start Free TrialLog in
Avatar of Zack
ZackFlag for Australia

asked on

Generation of combinations

Hi EE,

Calling on excel experts is there a method to generate all possible combinations for the following table; values can either be TRUE or FALSE.

Any assistance is appreciated.

Excel example.csv

Thank you

Avatar of Flyster
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Zack


Hi Flyster,

Thank you, I will try this when home.

It wont make a difference in the result but when defining variables like this

Dim v1, v2, v3 As Long
Dim v4, v5, v6 As Long

only v3 and v6 are Long and the other 4 are Variant. Variants are the slowest and largest of the variable types and so they will have the effect of slowing execution a tiny bit. Better is

Dim v1 As Long
Dim v2 As Long
Dim v3 As Long
Dim v4 As Long  
Dim v5 As Long
Dim v6 As Long

@Martin Thanks for the tip!

You're welcome. You might also be interested in my Guide to Writing Understandable and Maintainable VBA Code article.