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

How can I determine the number of rows in a spreadsheet useing visual basic. This number is dynamic and will be used to determine the end of a loop

seeker52
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default number of rows in spreadsheet

In general an approach is:
assume column A can be used for this purpose

set rng = cells(rows.count,1).End(xlup)

msgbox "Last row is " & rng.row



--
Regards,
Tom Ogilvy


"seeker52" wrote in message
...
How can I determine the number of rows in a spreadsheet useing visual

basic. This number is dynamic and will be used to determine the end of a
loop.

seeker52



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
sum the number of rows in a spreadsheet given 2 criteria??? Hank01061567 Excel Discussion (Misc queries) 3 November 13th 09 12:11 AM
How to number lines (rows) on both sides of spreadsheet crb.e4xplor Excel Worksheet Functions 6 April 7th 07 01:00 PM
What is the maximum number of rows in an Excel spreadsheet ? Larry Liu Excel Discussion (Misc queries) 5 September 20th 05 06:06 PM
cells() and counting number or rows on spreadsheet HeatherO Excel Worksheet Functions 7 March 2nd 05 10:36 AM
How do I limit number of rows and columns on a spreadsheet Valser New Users to Excel 3 February 12th 05 10:31 PM


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

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"