title: why does my VBA code always skip my 1st loop?
body: <p>I'm trying to make my VBA code loop through all my cells and lower the count of an already existing number in my 2nd sheet by 1 every time it encounters a specific text in a cell. However, whenever I run my loop in steps, it seems to be skipping the next j and goes directly to next i every time which is the next row. Is there some sort of formatting error with my code?</p>
  
  <pre><code>Sub DeleteSAC()
  
  Dim count As Integer
  Dim i As Integer
  Dim j As Integer
  
  Sheets(1).Select
  
  lastRow = ActiveSheet.Cells(Rows.count, "B").End(xlUp).Row
  
  'have to keep data in a table for this to actually work as it ctrls+left to the table, which will end where the very last text of any row is
  lastColumn = ActiveSheet.Cells(1, Columns.count).End(xlToLeft).Column
  
  
  count = Sheet2.Cells(1, 7).Value
  i = 2
  j = lastColumn
  
  For i = 2 To lastRow
  For j = lastColumn To 1
  If Sheet1.Cells(i, j) = "SAC" Then
      count = count - 1
      GoTo NextIteration
  End If
  Next j
  NextIteration:
  Next i
  
  Sheet2.Cells(1, 7) = count
  
  
  End Sub
  </code></pre>