number of rows in spreadsheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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 said:
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.
 

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