title: Permutations in VBA Excel
body: <p>I am trying to generate all the possible combinations of an array of characters. The input array has n characters, 5 &lt;= n &lt;= 7, and I would like to generate a second array A( C( n , 5 ) , 5 ) that contains all the C( n , 5 ) combinations. The order of the characters in the array isn't important.</p>
  
  <p>Here is an example:
  input array: { A, B, C, D, E, F } , so n = 6
  output array should be:</p>
  
  <pre><code>{A B C D E},
  {A B C D F},
  {A B C F E},
  {A B F D E},
  {A F C D E},
  {F B C D E},
  </code></pre>
  
  <p>This is pretty simple for n=5 and n=6, but gets very complicated for n=7. Does anyone know how should I make this ?</p>
  
  <p>Thanks</p>