View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Howard Howard is offline
external usenet poster
 
Posts: 536
Default Return last row no. of column with blanks at top

I have column F that the data starts in F5 to F?
I want the last row number.
All these examples return F5, one errors out.

I can't believe I don't have an example in cheat sheet.

Thanks.
Howard

lrC = Sheets("Data").Cells(Rows.Count, 6).End(xlUp).Row

lrC = Range("F5:F" & Range("F5").End(xlDown)).Row

If WorksheetFunction.CountA(Cells) 0 Then
lrC = Cells.Find(What:="*", After:=[F5], _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
End If

MsgBox lrC