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