Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA permutation of arrays

Status
Not open for further replies.

Katto

Technical User
Apr 6, 2005
42
US
Hello,

I have the following Table

Name Min Max Nvals
A -5 6.7 6
B -10 23 4
C 2 15 3

I am looking for a code that generates all the sets of [A B C] that include all the possible variatiosn as defined in the Table
The cath is that the code has to be able to cope with an apriori unknown number of variables , so nested loopes option seems to me unusable

Thank you
 
Hi Katto,

I'm glad to be able to help you a little bit.
It works, but now when I look at the code again, I see some places where it could be improved. I haven't done anything in VBA for a long time and so it wasn't that easy for me to rewrite the Python code in VBA at first. It was an opportunity for me to write something in VBA again and afterwards I had a good feeling that I had succeeded in the end.
 
it's a good start. eanough to allow me to cusotmize it to my specific need
thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top