How to use count in range of cells

  • Thread starter Thread starter nieuws
  • Start date Start date
N

nieuws

=count(B2:J10)

works in a macro, but how to use this function in VBA?
Hans
 
One way:

Dim nResult As Long
nResult = Application.Count(Range("B2:J10"))
 

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