I am writing a VBA excel code to find the all different combinations for 2-level factors. Each factor would have 2 possible levels. For example, if i have 3 factors the number of possible combinations of levels would be 2^3 = 8
. My goal is to print out the 8 combinations in Excel.
For example, my factors(levels) are Weight(50,60)
and height(160,170)
unique combinations would be
50,160
50,170
60,160
60,170
with weight in column A and height in column B
My question would be is it possible to write out a VBA code to print out all the possible combinations for factors (ranging from 2-12) and code should be written in excel VBA