Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Need VBA code to create all combinations of a routing.

Avatar of EdLB
EdLB asked on
Microsoft OfficeMicrosoft ExcelVBA
29 Comments1 Solution297 ViewsLast Modified:
I have a product that goes through a series of stations. Each station may have one or more process centers. I need VBA code that produces all the combinations if given the number of stations (NrStations) and the number of process centers at each station(NrPCs). Both NrStations and NrPCs can vary from product to product but there is an upper limit to both variables. For instance Max NrStations is 15 and Max NrPCs is 9.

Also, the product only flows in one direction from the first station to the last station.

See the attached spread sheet for an illustration.