View Single Post
  #34   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Looking For A Formula

Yes, Don, I got that and tested it. See my outer posts for my version
of your understanding of the task.

Your macro as I tested it...

Sub findgreaterzeroinblock()
Dim lr As Long, i As Long, j As Long, lc As Long

Application.ScreenUpdating = False
Columns(1).ClearContents
lr = Cells(Rows.Count, 2).End(xlUp).Row
lc = Cells.Find("*", Cells(Rows.Count, _
Columns.Count), , , xlByRows, xlPrevious).Column

For i = 1 To lr Step 2
For j = 2 To lc
If Cells(i, j) 0 Then
Cells(i, 1) = "1": Exit For
ElseIf Cells(i + 1, j) 0 Then
Cells(i + 1, 1) = "2": Exit For
End If
Next j
Next i
Application.ScreenUpdating = True
End Sub

Works great!

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc