View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
venus venus is offline
external usenet poster
 
Posts: 2
Default Find last used row in named range with data all around

Thank you all so very much!

All codes worked but for Lonney Tunes, it only gave me the last row of
the range as Dave suggested.

God bless,
Venus

Dave Peterson wrote:
Won't that just return the last row of the range--whether or not it's used?

LooneyTunes wrote:

Try this little snippet of code:

Sub FindLastRowInMyRange()

Dim rng As Range
Dim i As Integer

'to find the last used row in your named range _
regardless of where it is
Set rng = Range("hours")
i = rng.Rows(rng.Rows.Count).Row

'proof
MsgBox "The last used row within your named range is row: " & i

'to find the next row after your named range
i = i + 1
'proof
MsgBox "Start your next row he row " & i

End Sub

Good luck and happy programming

LooneyTunes