ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Number of rows used (https://www.excelbanter.com/excel-programming/325348-number-rows-used.html)

Bryan Dickerson

Number of rows used
 
How do I tell how many rows are really used in a spreadsheet?



Bernie Deitrick

Number of rows used
 
Bryan,

Count of actually used rows:
MsgBox ActiveSheet.UsedRange.Rows.Count

Highest row number
MsgBox Range("A1").SpecialCells(xlCellTypeLastCell).Row

Usually the same, but not always....

HTH,
Bernie
MS Excel MVP

"Bryan Dickerson" wrote in message
...
How do I tell how many rows are really used in a spreadsheet?





Bob Phillips[_6_]

Number of rows used
 
Do you mean the number of rows in the usedrange,

activesheet.usedrange.rows.count

or specifically those rows that contain data?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bryan Dickerson" wrote in message
...
How do I tell how many rows are really used in a spreadsheet?





Bryan Dickerson

Number of rows used
 
That works. Thanx!

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Bryan,

Count of actually used rows:
MsgBox ActiveSheet.UsedRange.Rows.Count

Highest row number
MsgBox Range("A1").SpecialCells(xlCellTypeLastCell).Row

Usually the same, but not always....

HTH,
Bernie
MS Excel MVP

"Bryan Dickerson" wrote in message
...
How do I tell how many rows are really used in a spreadsheet?








All times are GMT +1. The time now is 05:07 PM.

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