Number of rows used

  • Thread starter Thread starter Bryan Dickerson
  • Start date Start date
B

Bryan Dickerson

How do I tell how many rows are really used in a spreadsheet?
 
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
 
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)
 
That works. Thanx!

Bernie Deitrick said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top