count nonempty cells in a row excel vba -


having trouble syntax while trying count nonempty cells in row(in example, row two), excel vba.

have tried .rows(2:2) .rows(2) .cells(b1:b999) received errors three.

    dim intcount integer     intcount = counta(activesheet.rows(2, 2)) 

counta not vba function, worksheet function. try this:

dim intcount integer intcount = application.worksheetfunction.counta(activesheet.rows(2)) 

Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -