How do i find last not empty cell in a range
Perhaps:
Function lastone(r As Range) As String
For Each rr In r
If IsEmpty(rr) Then
Else
lastone = rr.Address(RowAbsolute:=False, ColumnAbsolute:=False)
End If
Next
End Function
--
Gary''s Student - gsnu200822
"excelent" wrote:
My senario (xl2003)
B3,B4,B4 holds an X
C5,C6,C8,C9,C10 holds an X
E4,E5,E6,E7 holds an X
and nothing more on that sheet
Is there a formula that return's a cell-address C10 (last not empty)
And how to do the same in VBA
i no about selection.specialcell.xllast to find row 10
and now i do a loop thru rng A10 to F10
but is there another smart way ?
|