Help needed regarding all possible combinations

poroff

New Member
Joined
May 22, 2015
Messages
2
Hello there,
Since yesterday I am trying to solve without any success what looked like a simple task in the first place. I have 5 available ports and 5 wires with different colors, which can be inserted to either of the ports. Which wire each port is accepting should looks like this:
Port 1Port 2Port 3Port 4Port 5
RedRedRedRedRed
GreenGreenGreenGreenGreen
WhiteWhiteWhiteWhiteWhite
BlackBlackBlackBlackBlack
GreyGreyGreyGreyGrey

<tbody>
</tbody>
A valid combination for example will be the following: Port 1 - Green, Port 2 - Red, Port 3 - Black, Port 4 - Grey and Port 5 - White. Overlapping cannot happen, i.e. the following combination is not possible: Port 1 - Red, Port 2 - Red, Port 3 - White, Port 4 - Grey, Port 5 - Black.
I seek a formula (or VBA code), which will list on separate rows all the possible combinations in the way that I wrote it in the valid combination example. I also have MS Access, which I guess can come handy too.
I tried to find a similar thread on the forum but without any success. I guess my lack of explanatory skills in English is giving me a hard time finding the exact keywords to search for.
I will really appreciate your help and I'm sorry if a similar question has been asked and answered before.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
In case it is of any relevance, I forgot to mention that my MS Office verson is 2010 64 bit and OS is Windows 7 64 bit.
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,331
Members
449,077
Latest member
jmsotelo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top