VBA code for creating factorial combinations

In certain situations, such as systematically generating computer code for analyzing data, it is necessary to create a combination of a variety of factors. Creating factorial combinations is easy when there are only a few factors and levels, but in more complicated situations the task is tedious and prone to error. This Excel file uses VBA to create full-factor combinations with up to 15 factors, each with up to 100 levels. An optional delimiter (such as ” AND “) can be inserted between each level in the combination.

The Excel file and its VBA macro can be downloaded here: creating_factorial_combinations.xlsm

– Eric DeRosia