Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Expert,
My excel spreadsheet is different days by days. Sometimes, it has 6552 rows. Sometime, it has 7744 rows .... etc ... etc .... Except Control + End + Down .... (VB does not help sometimes, that depend on whether each row is continuous without a break), what is the script in VB that can help me going to last row of the spreadsheet please ? Thanks in advance... |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
The last used row can be found with lastrow = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row to select column A of that row use Range("A" & Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row).Select Mike "Elton Law" wrote: Hi Expert, My excel spreadsheet is different days by days. Sometimes, it has 6552 rows. Sometime, it has 7744 rows .... etc ... etc .... Except Control + End + Down .... (VB does not help sometimes, that depend on whether each row is continuous without a break), what is the script in VB that can help me going to last row of the spreadsheet please ? Thanks in advance... |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sub range_reporter()
Dim r As Range Dim nLastRow As Long Set r = ActiveSheet.UsedRange nLastRow = r.Rows.Count + r.Row - 1 Cells(nLastRow, 1).Select End Sub -- Gary''s Student - gsnu200845 "Elton Law" wrote: Hi Expert, My excel spreadsheet is different days by days. Sometimes, it has 6552 rows. Sometime, it has 7744 rows .... etc ... etc .... Except Control + End + Down .... (VB does not help sometimes, that depend on whether each row is continuous without a break), what is the script in VB that can help me going to last row of the spreadsheet please ? Thanks in advance... |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
lr = Cells.Find("*", Cells(Rows.Count, Columns.Count) _
, , , xlByRows, xlPrevious).Row -- Don Guillett Microsoft MVP Excel SalesAid Software "Elton Law" wrote in message ... Hi Expert, My excel spreadsheet is different days by days. Sometimes, it has 6552 rows. Sometime, it has 7744 rows .... etc ... etc .... Except Control + End + Down .... (VB does not help sometimes, that depend on whether each row is continuous without a break), what is the script in VB that can help me going to last row of the spreadsheet please ? Thanks in advance... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Goto Tab | Excel Discussion (Misc queries) | |||
Goto or Find a Date in a Sheet | Excel Discussion (Misc queries) | |||
Gosub - Goto ? | Excel Worksheet Functions | |||
Goto code | Excel Discussion (Misc queries) | |||
If.....Then GoTo....... | Excel Discussion (Misc queries) |