Posted to microsoft.public.excel.programming
|
|
Find and select LastRow Minus 1
Like?
myLastRow = Cells.Find("*", [A1], , , xlByRows, xlPrevious).Row-1
"Carlie" wrote:
I am trying to wirte a macro to find and select a range based on the
first and last row (minus one row) of data on a spreadheet
Does anyone know how to incorporate myLastRow with minus 1 row?
Thanks in advance.
Range("A4").Select
myLastRow = Cells.Find("*", [A1], , , xlByRows, xlPrevious).Row
myLastColumn = Cells.Find("*", [A1], , , xlByColumns,
xlPrevious).Column
myLastCell = Cells(myLastRow, myLastColumn).Address
--
Carlie
------------------------------------------------------------------------
Carlie's Profile: http://www.excelforum.com/member.php...o&userid=33377
View this thread: http://www.excelforum.com/showthread...hreadid=533503
|