title: EXCEL VBA - Loop through cells in a row, if not empty, copy cell value into another row until next row not empty
body: <p>I'm considering writing some code to copy the data of row to the next until the next row is not empty. Suppose all in row 1 are headers.</p>
  
  <p>Data is like:</p>
  
  <pre><code>    A2 ClientA       B2 Product1       C2 Price       D2 Quantity       E2 Cost
      A3               B3                C3 Price       D3 Quantity       E3 Cost
      A4               B4                C4 Price       D4 Quantity       E4 Cost
      A5 ClientB       B5 Product2       C5 Price       D5 Quantity       E5 Cost
      A6               B6                C6 Price       D6 Quantity       E6 Cost
      A7 ClientC       B7 Product3       C7 Price       D7 Quantity       E7 Cost
      A8               B8                C8 Price       D8 Quantity       E8 Cost
      A9               B9                C9 Price       D9 Quantity       E9 Cost
  </code></pre>
  
  <p>A3 and A4 will fill with ClientA and B3 and B4 will fill with Product until the next row is not empty.</p>
  
  <p>I have searched to find a similar question, but I have no idea how to write it.</p>
  
  <p><a href="https://stackoverflow.com/questions/27000953/excel-vba-loop-through-cells-in-a-column-if-not-empty-print-cell-value-into#">EXCEL VBA - Loop through cells in a column, if not empty, print cell value into another column</a></p>
  
  <p>End results would be like:</p>
  
  <pre><code>    A2 ClientA       B2 Product1       C2 Price       D2 Quantity       E2 Cost
      A3 ClientA       B3 Product1       C3 Price       D3 Quantity       E3 Cost
      A4 ClientA       B4 Product1       C4 Price       D4 Quantity       E4 Cost
      A5 ClientB       B5 Product2       C5 Price       D5 Quantity       E5 Cost
      A6 ClientB       B6 Product2       C6 Price       D6 Quantity       E6 Cost
      A7 ClientC       B7 Product3       C7 Price       D7 Quantity       E7 Cost
      A8 ClientC       B8 Product3       C8 Price       D8 Quantity       E8 Cost
      A9 ClientC       B9 Product3       C9 Price       D9 Quantity       E9 Cost
  </code></pre>
  
  <p>Anyone have idea what the VBA code will be?</p>