title: How to execute one do loop after another?
body: <p>a few days ago I used one piece of coding from someone who helped me create a list in a new sheet with a program that checks a column in a different sheet, and at each cell, it makes sure that the value is the string &quot;daily&quot;. I wanted to do the same after it's done with the first do-until but it does not seem to execute the second do-until.</p>
  <pre><code>Private Sub PopulateTaskList()
   Dim wMS As Worksheet, wsTL As Worksheet, rngC As Range
   Dim boolExists As Boolean, i As Long
     
      'Create new sheet named
      For i = 1 To Worksheets.Count 'check if the sheet exists
          If Worksheets(i).Name = &quot;Task List&quot; Then
              Set wsTL = Worksheets(i)
              boolExists = True
              Exit Sub
          End If
      Next i
      If Not boolExists Then
          Sheets.Add(After:=Sheets(Sheets.Count)).Name = &quot;Task List&quot;
          Set wsTL = Worksheets(&quot;Task List&quot;)
      End If
      
      Set wMS = Worksheets(&quot;MSS&quot;)
      
      Set rngC = wMS.Range(&quot;C3&quot;)
      Do Until rngC.Value = &quot;&quot;
          If rngC.Value = &quot;Daily&quot; Then
              wsTL.Rows(&quot;2:2&quot;).EntireRow.Insert
              rngC.Copy wsTL.Range(&quot;B2&quot;) 'if you place the range in clipboard, it will be copied during the row insertion...
              
              rngC.Offset(0, 1).Copy wsTL.Range(&quot;D2&quot;)
              
              rngC.Offset(0, -2).Copy wsTL.Range(&quot;C2&quot;)
              
              rngC.Offset(0, -1).Copy wsTL.Range(&quot;A2&quot;)
          End If
          Set rngC = rngC.Offset(1) 'set the range as the next cell down
      Loop
      
      Do Until rngC.Value = &quot;&quot;
          If rngC.Value = &quot;Weekly&quot; Then
              wsTL.Rows(&quot;2:2&quot;).EntireRow.Insert
              rngC.Copy wsTL.Range(&quot;B2&quot;) 'if you place the range in clipboard, it will be copied during the row insertion...
              
              rngC.Offset(0, 1).Copy wsTL.Range(&quot;D2&quot;)
              
              rngC.Offset(0, -2).Copy wsTL.Range(&quot;C2&quot;)
              
              rngC.Offset(0, -1).Copy wsTL.Range(&quot;A2&quot;)
          End If
          Set rngC = rngC.Offset(1) 'set the range as the next cell down
      Loop
  End Sub
  </code></pre>
  <p>Basically, I want to do the first do until with the if condition having the daily and then the second do until with the if condition having the weekly but it only executes the first one. I tried adding an else if but as soon as it hits a weekly on the column that it evaluates it starts doing the weekly if and the idea is that it first finishes all the dailys and then moves on to the weeklys.</p>