J
Joe Fish
Hi,
In the following block of code, theoretically, each cell in a range
gets compared to one above it. If it matches, nothing happens. If it is
different, the macro CreatePSFrontLabel runs. What actually happens,
though, is the macro runs for the first six cells in the range (no
matter how it compares to the cell above it) and then stops.
Thanks in advance,
Joe
Sub MOO()
Dim rng As Range
With Sheets("Scroller Info")
Set rng = .Range(.Range("E2"), .Range("E2").End(xlDown))
End With
For Each cell In rng
If cell.Value <> cell.Offset(-1).Value Then
CreatePSFrontLabel
End If
Next
In the following block of code, theoretically, each cell in a range
gets compared to one above it. If it matches, nothing happens. If it is
different, the macro CreatePSFrontLabel runs. What actually happens,
though, is the macro runs for the first six cells in the range (no
matter how it compares to the cell above it) and then stops.
Thanks in advance,
Joe
Sub MOO()
Dim rng As Range
With Sheets("Scroller Info")
Set rng = .Range(.Range("E2"), .Range("E2").End(xlDown))
End With
For Each cell In rng
If cell.Value <> cell.Offset(-1).Value Then
CreatePSFrontLabel
End If
Next