title: VBA excel - loop in a loop
body: <p>First of all, i'd like to point out im a beginner in VBA excel coding.
  I can't seem to know how to code a loop in a loop for the following problem:
  My excel has in column D the following info:
  D2:12, 
  D3:12,
  D4:5</p>
  
  <p>and im trying to automate column E as following:
  E1 to E12 would be the information in D2,
  E13 to E25 would be the information in D3. etc... up to a certain established threshold.</p>
  
  <p>I currently have coded the following:</p>
  
  <pre><code>Sub salairemensuelle()
  
  Dim xrow As Integer, xcol As interger, n As Integer, nbrdecolonnedemois As Integer 
  
  xrow = 2 
  
  xcol = 4
  
  Do Until Cells(xrow, xcol).Value &gt;= 25 'threshold of 25
          n = Range("D65536").End(xlUp).Row 'finding row of D column
          For nbrdecolonnedemois = 1 To n
  
  End Sub
  </code></pre>
  
  <p>I seem to be stuck here since i dont know how to loop the first D column and then closing both loops. </p>
  
  <p>Could anybody take a look. Thanks</p>