3rd option :)
works with numbers AND text, and is reasonably fast
example..
FirstNonBlank(3).Offset(2,0).select
Function FirstNonBlank(rownum As Long) As Range
'Note: works on activesheet only
With Rows(rownum)
If IsEmpty(.Cells(1)) And Application.CountA(.Cells) < 0 Then
Set FirstNonBlank = .Cells(1).End(xlToRight)
Else
Set FirstNonBlank = .Cells(1)
End If
End With
End Function
keepITcool
< email : keepitcool chello nl (with @ and .)
< homepage:
http://members.chello.nl/keepitcool
David wrote:
Been trying to solve this on my own, but can't get it right.
Row 3 contains numbers. I want a line that selects the cell 2 rows under
the first number (location varies month to month) in that row.
This does it for *last* number:
Cells(3, Columns.Count).End(xlToLeft).Offset(2, 0).Select
How to modify?