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
Post a Comment