Counting Rows

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to count the number of rows between empty rows (excluding the
heading). My data is setup like this in the worksheet. Can anyone suggest a
method to do this in VBA?

heading1 heading2 heading3
1 1 1
2 2 2
3 3 3

heading1 heading2 heading3
4 4 4
5 5 5
6 6 6
 
I would probably use something like
fbr=range("a1").end(xldown).row
nbr=cells(fbr,1).end(xldown.row
nrs=nbr-fbr
fbr=nbr
 

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