Number of rows not empty

  • Thread starter Thread starter gps 4 pilots
  • Start date Start date
G

gps 4 pilots

A beginner question:
how, in VBA, do I get the number of rows that are not MT in a sheet ? In
other words, how do I make VBA count the number of records in a sheet,
assuming that the first MT row is the end of the file

Thank you

Jacquelin Hardy
 
set rng = cells(rows.count,1).End(xlup)
msgbox "number of non empty rows is " & rng.row

Number of records would be one less than that if the first row is a header
row.
 
Thank's Tom
Thank's Bob

JH

Tom Ogilvy said:
set rng = cells(rows.count,1).End(xlup)
msgbox "number of non empty rows is " & rng.row

Number of records would be one less than that if the first row is a header
row.
 

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