View Single Post
  #31   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

To follow Don's understanding of your task...

Sub PlaceX3()
Dim vTemp As Variant
Dim lRow As Long, lCol As Long, j As Long

lCol = Cells.Find(What:="*", _
After:=Cells(Rows.Count, Columns.Count), _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Column
Columns(1).ClearContents

For lRow = 1 To Cells(Rows.Count, 2).End(xlUp).Row Step 2
vTemp = Range(Cells(lRow, 2), Cells(lRow + 1, lCol))
For j = 1 To lCol - 1
If vTemp(1, j) 0 Then
Cells(lRow, 1) = "X": GoTo nextset
ElseIf vTemp(2, j) 0 Then
Cells(lRow, 1).Offset(1) = "X": GoTo nextset
End If
Next 'j
nextset:
Next 'lRow
End Sub

--
Garry

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