Q:

Identify row number where preceding cell value in column differ only in visible range

I am looking to retrieve the row number within the visible range (the data is filtered) where the current cell being checked does not equal <> the previous cell in the same column.
I wrote the following code that does return the correct row of the change between preceding and current (over/under) cells, however, in the immediate window it returns the same row value 22 times, the same number of times that I have visible rows.  I just need to return the row number once.  It must be happening in the for i loop I have.  Your help is much appreciated.
Sub PreceedingVisibleCellDiff()
'find row number when cell value differs from cell above

Dim LastRow As Long, cl As Range, rng As Range

LastRow = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row
Debug.Print "LastRow: " & LastRow

Set rng = Range("B5:B" & LastRow)

For Each cl In rng.SpecialCells(xlCellTypeVisible)

    For i = LastRow To 5 Step -1

    If Cells(i, 12) <> "" Then
        If Cells(i, 8) <> Cells(i, 8).Offset(-1) Then Debug.Print i
    End If

    Next i

Next cl

End Sub

A:

Working solution based off urdearboy's recommendation above:
Sub PreceedingVisibleCellDiff()
'find row number when cell value differs from cell above

Dim LastRow As Long, cl As Range, rng As Range

LastRow = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row
Debug.Print "LastRow: " & LastRow

Set rng = Range("B5:B" & LastRow)

For Each cl In rng.SpecialCells(xlCellTypeVisible)

    'check that colum L(12) has an action item
    If Cells(cl.Row, 12) <> "" Then
        'at the row in column H (8) where the preceding cell does not match, there is a
        'new action to be acted upon
        If Cells(cl.Row, 8) <> Cells(cl.Row, 8).Offset(-1) Then Debug.Print cl.Row

        '< do something here using cl.Row >

    End If

Next cl

End Sub

