Countif and VBA

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

Guest

I have the following equation in VBA

SummaryBSheet = lrow - "=COUNTIF($H:$H,0)"

if I enter what's in the "" in an Excel workbook, no problem, when I put it
in the code, I get a type mismatch. What am I doing wrong? I'm sure it's
something simple. lrow works. I've not used SummaryBSheet before
 
Hi Barb

You can use
Application.WorksheetFunction.CountIf(Columns("H"), 0)
 

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