ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Counting Rows in 2007 (https://www.excelbanter.com/excel-programming/410110-counting-rows-2007-a.html)

Ken Hudson

Counting Rows in 2007
 
In many of my old macros I used the following code to get a row count in a
worksheet:

CountRows = Range("A65536").End(xlUp).Row

With the changes in 2007 I assume that I should use the following, more
generic code now?

CountRows = Cells(Rows.Count, "A").End(xlUp).Row

--
Ken Hudson


All times are GMT +1. The time now is 03:24 AM.

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