Hi all, in the excerpt of a code below I am trying to enter all permutations of 4 things. Is there a shortcut to do this without typing out all 256 permutations with repetition (4^4 = 256)? Thanks for your help!
If Col = 1 Then
Ary = Array (1, 1, 1, 1)
ElseIf Col = 2 Then
Ary = Array (1, 1, 1, 1)
ElseIf Col = 3 Then
Ary = Array (1, 1, 1, 1)
ElseIf Col = 4 Then
Ary = Array (1, 2, 3, 4)
If Col = 1 Then
Ary = Array (1, 1, 1, 1)
ElseIf Col = 2 Then
Ary = Array (1, 1, 1, 1)
ElseIf Col = 3 Then
Ary = Array (1, 1, 1, 1)
ElseIf Col = 4 Then
Ary = Array (1, 2, 3, 4)