title: making multiplication table by using do while loop with excel vba
body: <p>I am trying to do 2 dimension dynamic multiplication table by using "do while loop" but I can get only 1 row with this code can someone help? and i need to use do while loop not another loop.</p>
  
  <pre><code>Sub multp_doWhileLoop()
  Dim i As Long
  Dim j As Long
  Dim k As Long
  Dim l As Long
  k = Range("b1").Value
  l = Range("d1").Value
  ReDim multp_tab(k, l) As Long 'defining ixj matrix
  i = 1
  j = 1
  Range("a2:zz100000").Clear
  Cells(2, 1) = "mult."
      Do While i &lt; k + 1
          Do While j &lt; l + 1
          Cells(i + 2, 1).Value = i       'for frame
          Cells(2, j + 1).Value = j       '
          multp_tab(i, j) = i * j
          j = j + 1
  
         Loop
         i = i + 1
      Loop
      i = 1
      j = 1
          Do While i &lt; k + 1
              Do While j &lt; l + 1
              Cells(i + 2, j + 1).Value = multp_tab(i, j)
              j = j + 1
  
              Loop
          i = i + 1
          Loop      
  End Sub
  </code></pre>