Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Number of rows used

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 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?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default 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?






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fill Cells with same number in three rows then skip to next number Tracy Excel Worksheet Functions 2 November 7th 08 03:12 PM
Count number of rows, where non relevant rows are hidden Pieter Excel Discussion (Misc queries) 2 November 8th 06 12:24 PM
Get number of rows that data uses, including blank rows Denham Coote Excel Discussion (Misc queries) 5 August 22nd 06 02:10 PM
Get number of rows that data takes up, including blank rows Denham Coote Excel Worksheet Functions 2 August 21st 06 09:18 AM
flexible paste rows function that inserts the right number of rows marika1981 Excel Discussion (Misc queries) 1 February 18th 05 02:40 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"