title: Excel VBA macro to generate a list of possible combinations
body: <p>I am trying to write an excel macro to generate a list of possible combinations.  </p>
  
  <p>I have a fixed series of values in different columns</p>
  
  <p>A, B, C, D - each in it's own column.</p>
  
  <p>I have a list of new values to replace with A, B, C or D and would like to generate all of the combinations. </p>
  
  <p>List of new values i.e. 1, 2, 3, 4</p>
  
  <p>I would get a total of 16 different combinations</p>
  
  <p>For example,</p>
  
  <p>1BCD<br>
  2BCD<br>
  3BCD<br>
  4BCD<br>
  A1CD<br>
  A2CD<br>
  A3CD  </p>
  
  <p>...<br>
  ABC1<br>
  ABC2<br>
  ABC3<br>
  ABC4</p>
  
  <p>I'm not sure if this is clear but I would like to generate combinations by iterating through each column to generate the possible combinations with the new values inserted. </p>