title: Start date and end date iterating using excel vba
body: <p>I am writing a excel VBA code, where i would like to iterate the start end and end date adding + 2.</p>
  
  <p><b>Scenario and assumption in sheet1 as shown below </b></p>
  
  <p>cell reference <strong>I1</strong>= 13-Jul-2018</p>
  
  <p>Input Table
  from A1 till C17 the cells value are with column header</p>
  
  <pre>
  stocks  start end   end date
  dummy1      
  dummy2      
  dummy3      
  dummy4      
  dummy5      
  dummy6  
  </pre>  
  
  <p>The code logic required
  <li>Initially <strong>I1</strong> as the start date i,e <strong>13-Jul-18</strong> of the first row </li>
  <li>In the Same row, for end date should add +2 , that will be <strong>15-Jul-18</strong> </li>
  <li>In the next row, <strong>start date</strong> will be the previous row <strong>end date(15-Jul-18)</strong> by adding <strong>+1</strong> that will be 16-Jul-18 </li>
  <li> And in the Same row, <strong>End date</strong> will be the added +2 of the same row <strong>start date(16-Jul-18)</strong> that will be <strong>18-Jul-18</strong> </li>
  <li>The same logic flows to the next occurring row till the stock column is blank 
  <li>if any change in the start end of that row changes , the changes should start from the current row to the next rows with same above logic </li></p>
  
  <p>Example the output is </p>
  
  <pre>
  stocks  start end   end date
  dummy1  13-Jul-18   15-Jul-18
  dummy2  16-Jul-18   18-Jul-18
  dummy3  19-Jul-18   21-Jul-18
  dummy4  22-Jul-18   24-Jul-18
  dummy5  25-Jul-18   27-Jul-18
  dummy6  28-Jul-18   30-Jul-18
  </pre>
  
  <p>Code I have written below,Need your help!!!</p>
  
  <pre><code>Sub zigZag()
  Dim wb As Workbook
  Dim ws As Worksheet
  Dim lastrow As Integer
  Set wb = ThisWorkbook
  Set ws = wb.Worksheets("Sheet1")
  ws.Activate
  currentValue = Range("I1").Value
  ws.Range("A2").Activate 
  Do
   If ActiveCell.Value = "" Then Exit Do
   ActiveCell.Offset(0, 1) = currentValue
   ActiveCell.Offset(0, 2) = currentValue + 2
   ActiveCell.Offset(1, 1) = ActiveCell.Offset(0, 2) + 1
   ActiveCell.Offset(1, 2) = ActiveCell.Offset(1, 1) + 2
   ActiveCell.Offset(2, 0).Activate
  Loop
  End Sub
  </code></pre>