Juggler_IN
Active Member
- Joined
- Nov 19, 2014
- Messages
- 358
- Office Version
- 2003 or older
- Platform
- Windows
I have the following X,Y Data in two Columns:
X=4,8,2,1,9 (Column A)
Y=3,5,1,7,8 (Column B)
What I need is, on the subsequent rows, all the possible rearrangements of this data.
That is, for example:
1st output:
X=4,8,2,1,9 (Column A)
Y=5,1,7,8,3 (Column B)
2nd output:
X=4,8,2,1,9 (Column A)
Y=1,7,8,3,5 (Column B)
and so on.
In the example the values were changing their position in Y only. But, in reality there are 120 such possible pairs for N=5 X,Y Data, i.e. FACT(5)=120 (Factorial).
I need to list all possible pairs of N-pair x,y datasets (N can change).
Is there a way to get these pairs using VBA?
Thanks.
X=4,8,2,1,9 (Column A)
Y=3,5,1,7,8 (Column B)
What I need is, on the subsequent rows, all the possible rearrangements of this data.
That is, for example:
1st output:
X=4,8,2,1,9 (Column A)
Y=5,1,7,8,3 (Column B)
2nd output:
X=4,8,2,1,9 (Column A)
Y=1,7,8,3,5 (Column B)
and so on.
In the example the values were changing their position in Y only. But, in reality there are 120 such possible pairs for N=5 X,Y Data, i.e. FACT(5)=120 (Factorial).
I need to list all possible pairs of N-pair x,y datasets (N can change).
Is there a way to get these pairs using VBA?
Thanks.