ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Last row is empty (https://www.excelbanter.com/excel-programming/378147-last-row-empty.html)

Peter Ostermann[_3_]

Last row is empty
 
Hi NG,

Last_Row = Sheets("Data").Cells.SpecialCells(xlCellTypeLastCe ll).Row

sometimes result points to an empty row below the last data-filled row.
Any hints what can be the cause? Which formula gives the correct result
if the last data-filled row is searched for (avoiding a loop to that point).
Thanks in advance.

Regards
Peter Ostermann


Ron de Bruin

Last row is empty
 
Hi Peter

Use the function I use on this page
http://www.rondebruin.nl/copy1.htm

See also this page
http://www.contextures.com/xlfaqApp.html#Unused


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Peter Ostermann" wrote in message ...
Hi NG,

Last_Row = Sheets("Data").Cells.SpecialCells(xlCellTypeLastCe ll).Row

sometimes result points to an empty row below the last data-filled row.
Any hints what can be the cause? Which formula gives the correct result
if the last data-filled row is searched for (avoiding a loop to that point).
Thanks in advance.

Regards
Peter Ostermann


Peter Ostermann[_3_]

Last row is empty
 

"Ron de Bruin" schrieb

Hi Peter

Use the function I use on this page
http://www.rondebruin.nl/copy1.htm

See also this page
http://www.contextures.com/xlfaqApp.html#Unused



Thank you Ron. Perfect assistance.

Best Regrads
Peter Ostermann

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Peter Ostermann" wrote in message
...
Hi NG,

Last_Row = Sheets("Data").Cells.SpecialCells(xlCellTypeLastCe ll).Row

sometimes result points to an empty row below the last data-filled row.
Any hints what can be the cause? Which formula gives the correct result
if the last data-filled row is searched for (avoiding a loop to that
point).
Thanks in advance.

Regards
Peter Ostermann




All times are GMT +1. The time now is 08:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com