View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Question Question is offline
external usenet poster
 
Posts: 5
Default Iterate over undefined number of variables

I have a problem I can't seem to find a solution to, so hopefully
someone has some ideas...

I found a problem similar to mine with a solution that gets me part of
the way there, see the below link:

http://www.excelforum.com/excel-prog...excel-vba.html

I would like to be able to take table, such as...

Variable

Variable 1(Shirt size) [small;medium;large;...;Y]
Variable 2(shirt color)[blue;green;red;....;Z]
....
variable X (...)

When the number of variables is fixed, the solution seems to just be
the correct number of for...next loops. However, when the number of
variables is undefined; I run into a problem. I need the code to be
flexible enough to adjust for the number of variables.

I know I can build an array to pick up the number of variables, and
also the number of selections within each variable, but once I've got
that, I'm stuck; since the only option I can think of is the hard-
coded for/next loops.

Ideas?