title: Object required error when performing For Each loop VBA
body: <p>I am new to VBA and have encountered this problem when attempting a For Each loop. I have wrapped my head around this for quite some time and couldn't find any answers on this forum. </p>
  
  <p>I suspect it's a silly mistake and would really appreciate it if I could get some help. Thanks alot in advance!</p>
  
  <pre><code>Sub AngleAndEComparison()
  
      Dim rngAngle As Range
      Dim Nrow As Integer
      Dim n#, placeholder#
  
      Nrow = 1
      n = 0
      Set rngAngle = Intersect(Columns(5), ActiveSheet.UsedRange)
      ' Set rngAngle = ActiveSheet.Columns(5)
      For Each cell In rngAngle
          If cell.Value &lt;&gt; "" Then
              If Range("E" &amp; Nrow).Value &gt; 75 And Range("E" &amp; Nrow).Value &lt; 105 Then 
                  placeholder = 1
              If Range("G" &amp; Nrow).Value &gt;= 3 And placeholder = 1 Then
                      n = n + 1
                      cell.Interior.ColorIndex = 36
                      cell.Interior.ColorIndex = 36
                      placeholder = 0
              End If
              Nrow = Nrow + 1
          End If
      Next
  
      ActiveSheet.Cells(5, 11).Value = n
      ActiveSheet.Cells(5, 10).Value = "Elongated Cells within 15°:"
  End Sub
  </code></pre>