Can you pick out a column that's always filled in?
If yes, then maybe you could do this:
Option Explicit
Sub testme()
Dim LastRow As Long
With Worksheets("sheet1")
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
End With
MsgBox LastRow & " is the last row with data in column A"
End Sub
if there are two rows of headers, just subtract 2.
MsgBox LastRow - 2 & " is the total number of rows"
But there are lots of ways to get the number rows.
noname wrote:
>
> I have some rows populated in an excel sheet. Is there a way I can write
> a macro to count the number of populated rows ?
>
> ------------------------------------------------
> ~~ Message posted from http://www.ExcelTip.com/
> ~~View and post usenet messages directly from http://www.ExcelForum.com/
--
Dave Peterson
(E-Mail Removed)