View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
excelent excelent is offline
external usenet poster
 
Posts: 695
Default How do i find last not empty cell in a range

thanks for reply Gary
but supose it was a wery large range to test
that why i dont wana use a loop or as u do for each


"Gary''s Student" skrev:

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 ?