ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Last Real Cell (https://www.excelbanter.com/excel-programming/403863-last-real-cell.html)

franciz

Last Real Cell
 
Hi all.
I am trying to get to the last row in a table of data. However the last few
rows are hidden and it is the visible row that I want to go
If do cells(1,1).end(xldown).row
however this will stop at the last visible cell
if I do cells(1,1).end(xldown).end(xldown).row
it takes me to the very last cell in the spreadsheet
I can't take advantage of the usedrange as there is other data lower down on
the spreadsheet that needs to remain.

Any help would be much appreciated

thanks in advance.

regards,


FSt1

Last Real Cell
 
hi
with this....
cells(1,1).end(xldown).row
you sould have gotten a invalid use of property error. I did.
try this...
cells(1,1).end(xldown).select

Regards
FSt1

"franciz" wrote:

Hi all.
I am trying to get to the last row in a table of data. However the last few
rows are hidden and it is the visible row that I want to go
If do cells(1,1).end(xldown).row
however this will stop at the last visible cell
if I do cells(1,1).end(xldown).end(xldown).row
it takes me to the very last cell in the spreadsheet
I can't take advantage of the usedrange as there is other data lower down on
the spreadsheet that needs to remain.

Any help would be much appreciated

thanks in advance.

regards,


Dave Peterson

Last Real Cell
 
Maybe just looping through the top table's first column would be best.

Or can you unhide the rows?

franciz wrote:

Hi all.
I am trying to get to the last row in a table of data. However the last few
rows are hidden and it is the visible row that I want to go
If do cells(1,1).end(xldown).row
however this will stop at the last visible cell
if I do cells(1,1).end(xldown).end(xldown).row
it takes me to the very last cell in the spreadsheet
I can't take advantage of the usedrange as there is other data lower down on
the spreadsheet that needs to remain.

Any help would be much appreciated

thanks in advance.

regards,


--

Dave Peterson


All times are GMT +1. The time now is 10:08 PM.

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