worksheetfunction

  • Thread starter Thread starter nyn04
  • Start date Start date
N

nyn04

I try to use the following

CountPosS = WorksheetFunction.CountIf(TradesDiff, ">0")

and I get an error messege type mismatch when I run


CountPosS = WorksheetFunction.CountIf(TradesDiff) it works

my TradesDiff is defined
Dim TradesDiff()
m= 17

ReDim TradesDiff(m)

then I run a loop to fill in the values

what do I have to do to be able to use the countif propert
 
try any of these
MsgBox Application.CountIf(Range("f1:f12"), ">0")
MsgBox Application.CountIf(range("tradesdiff"), ">0")
MsgBox Application.CountIf([tradesdiff], ">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