count non-empty rows

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

Guest

Hi
please I need advice
I need to count cells in separate columns. There are no empty cells among them
number of columns may vary
everything works in loop

this count all the cells (65000+...
for x=1 to colcount
cCount=ActiveSheet.Columns(CurrentCol).Rows.Count
total = total + cCount
next x

could anybody help

Jan
 
Maybe...

cCount = application.counta(activesheet.columns(currentcol))

Or maybe:

total = application.counta(activesheet.usedrange)
 
thanks



Dave Peterson said:
Maybe...

cCount = application.counta(activesheet.columns(currentcol))

Or maybe:

total = application.counta(activesheet.usedrange)
 

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