ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Last Row and Column (https://www.excelbanter.com/excel-programming/293700-last-row-column.html)

Pubert

Last Row and Column
 
Is there a VBA Function that will give me the last used
column and row? Or what suggestions does anybody have?

Nigel[_8_]

Last Row and Column
 
Courtesy of John Peltier in an earlier post........

This tells me the address of the highest nonblank cell in column C:

Range("$C$65536").End(xlup).Address

This tells you the row:

Range("$C$65536").End(xlup).Row


"Pubert" wrote in message
...
Is there a VBA Function that will give me the last used
column and row? Or what suggestions does anybody have?





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

John Williams[_4_]

Last Row and Column
 
"Pubert" wrote in message ...
Is there a VBA Function that will give me the last used
column and row? Or what suggestions does anybody have?


lastRow = Cells(rows.Count, ActiveCell.Column).End(xlUp).row
lastColumn = Cells(ActiveCell.row, Columns.Count).End(xlToLeft).Column


All times are GMT +1. The time now is 06:57 AM.

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