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.
 
Back
Top