title: End If/Next C Statement with For Loop / VBA
body: <p>I have a fairly complex for <code>For</code> Loop with an <code>If</code> Statement inside and another <code>For</code> Loop inside that. And given a certain criteria (Namely <code>If InStr(1, q.Value, "Total")</code>) inside that second For Loops I would like to just end the entire <code>If</code> Statement and move to the <code>Next C</code>. </p>
  
  <p>I understand that this is layered like an onion and there might not be an easy way out. </p>
  
  <pre><code>For Each C In copyRng
  
          If IsNumeric(C) And C.Value &lt;&gt; "0" And Len(C) &lt;&gt; 0 And C.Value &lt;&gt; "2017" Then 
  
              Set rowRange = xSheet.Range(C, C.EntireColumn.Cells(1)) 'set range from cell up to the top cell of the comment/ Fix the 2017 thing
  
              For Each q In rowRange 'Loop through that range and find the Account number just above it and set it as rowSrc
                  If InStr(1, q.Value, "C-") And Not ISIN(C, uniqueVal) Then Set rowSrc = q
                  If InStr(1, q.Value, "Total") Then End If 'At this point I want to leave the entire If Statement and move on to the next C
              Next q
  
  
              Set colSrc = C.EntireRow.Offset(0).Cells(1) 'find alert connected with the number
              numCol = DestSh.Cells.Find(colSrc.Value, SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Column 'look for the column in which the same alert is listed
              numRow = DestSh.Cells.Find(rowSrc.Value, SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Row 'look for row in which the same account is listed
  
              'Set destination
              Set destRng = DestSh.Cells(numRow, numCol)
  
              'Copy to destination Range
              C.Copy destRng
  
          End If
  
      Next C
  </code></pre>