VBA referencing next cell in For loop
<p>I need to compare a cell to the one below it in a loop. i know for most languages you can say something like "if cells(i,1).value = cells(i+1,1).value then..."</p>

<p>is there a way to do this in vba for some reason it isn't working for me. thanks</p>

<pre><code>For i = 7 To ltrw 
    If (Cells(i, 1).Value = 0 And Cells(i + 1, 1).Value = 0 Then 
        Cells(i, 1).EntireRow.Hidden = True 
    End If 
Next i
</code></pre>