Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Defining a Range
I want to define the last used row on a worksheet. I could use
"SpecialCells(xlLastCell)" however this also includes extra rows that were used previously but are now empty. I think there is a function that gives the last cell or row in a block/table of cells but I can't find it. Any ideas? Kaval |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Defining a Range
I used Ron DeBruin's google search addin
http://tinyurl.com/4d2yg -- Don Guillett SalesAid Software "Kaval" wrote in message ... I want to define the last used row on a worksheet. I could use "SpecialCells(xlLastCell)" however this also includes extra rows that were used previously but are now empty. I think there is a function that gives the last cell or row in a block/table of cells but I can't find it. Any ideas? Kaval |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Defining a Range
Kaval
Sub FindLastRow() Dim LastRow As Long If WorksheetFunction.CountA(Cells) 0 Then 'Search for any entry, by searching backwards by Rows. LastRow = Cells.Find(What:="*", after:=[A1], _ SearchOrder:=xlByRows, _ searchdirection:=xlPrevious).Row MsgBox LastRow End If End Sub Gord Dibben Excel MVP On Sun, 5 Sep 2004 15:13:02 -0700, "Kaval" wrote: I want to define the last used row on a worksheet. I could use "SpecialCells(xlLastCell)" however this also includes extra rows that were used previously but are now empty. I think there is a function that gives the last cell or row in a block/table of cells but I can't find it. Any ideas? Kaval |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Defining a range | Excel Worksheet Functions | |||
Defining a Range | Excel Programming | |||
Defining range | Excel Programming | |||
Defining a range | Excel Programming | |||
Defining Range | Excel Programming |