ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Finding the last used row in a specific column... (https://www.excelbanter.com/excel-programming/375629-finding-last-used-row-specific-column.html)

havocdragon

Finding the last used row in a specific column...
 
Hi all.

Currently I am using
Lastrow = Activesheet.usedrange.row - 1 + activesheet.usedrange.rows.count

I can't seem to figure out how to get this to work in a specified column

Jim Thomlinson

Finding the last used row in a specific column...
 
For column A use...

lastrow = cells(rows.count, "A").end(xlUp).Row
--
HTH...

Jim Thomlinson


"havocdragon" wrote:

Hi all.

Currently I am using
Lastrow = Activesheet.usedrange.row - 1 + activesheet.usedrange.rows.count

I can't seem to figure out how to get this to work in a specified column


Ron de Bruin

Finding the last used row in a specific column...
 
Try this for column A in Sheet1

Lr = Sheets("sheet1").Range("A" & Rows.Count).End(xlUp).Row


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



"havocdragon" wrote in message ...
Hi all.

Currently I am using
Lastrow = Activesheet.usedrange.row - 1 + activesheet.usedrange.rows.count

I can't seem to figure out how to get this to work in a specified column





All times are GMT +1. The time now is 07:26 AM.

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