 <p>Just loop over the selections:</p> <pre><code>Sub Maja() Dim K As Long K = 1 vals = Array("3", "6", "9") For Each a In vals For Each b In vals For Each c In vals For Each d In vals For Each e In vals Cells(K, 1) = a &amp; b &amp; c &amp; d &amp; e K = K + 1 Next e Next d Next c Next b Next a MsgBox K End Sub </code></pre> <p>A snap of the top of the list:</p> <p><img src="https://i.stack.imgur.com/1DUhg.png" alt="enter image description here"></p> <p><strong>NOTE:</strong></p> <p>Technically, you would call these <strong>permutations</strong> rather than <strong>combinations</strong> because values like <em>33363</em> and <em>33336</em> both appear in the list as they represent different numerical values.</p>