![]() |
Number of rows not empty
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 |
Number of rows not empty
NumRows = Application.Counta(Columns(1)))
"gps 4 pilots" wrote in message ... 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 |
Number of rows not empty
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. -- Regards, Tom Ogilvy "gps 4 pilots" wrote in message ... 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 |
Number of rows not empty
Thank's Tom
Thank's Bob JH "Tom Ogilvy" wrote in message ... 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. -- Regards, Tom Ogilvy "gps 4 pilots" wrote in message ... 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 |
All times are GMT +1. The time now is 12:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com