Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sometimes setting a range to the .usedrange will reset the lastusedcell to what
you think it should be: Option Explicit Sub testme() Dim DummyRng As Range With Worksheets("sheet1") Set DummyRng = .UsedRange MsgBox .UsedRange.Rows(.UsedRange.Rows.Count).Row End With End Sub chris wrote: Then i guess this will do the trick! RwCnt = ActiveSheet.UsedRange.Rows.Count LastRow = ActiveSheet.UsedRange.Offset(x).Resize(1).Row - 1 ----- Tom Ogilvy wrote: ----- goto a blank sheet. enter data in A11, A12, A13 Now run you code: ? Rows(ActiveSheet.UsedRange.Rows.Count).Row 3 Doesn't quite give the correct answer. You can't assume the usedrange always starts with the first row. -- Regards, Tom Ogilvy "chris" wrote in message ... try this: Rows(ActiveSheet.UsedRange.Rows.Count).Row -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
final return! | Excel Worksheet Functions | |||
Final day of month | Excel Worksheet Functions | |||
My Final #DIV/0! that I'd like to say Goodbye to! | Excel Worksheet Functions | |||
Help for final touch up to my code | Excel Programming | |||
Need final code tweak | Excel Programming |