using countif function in code

L

Lars-Åke Aspelin

How can I express this in VBA code:

countif(c:c,c2)

Thanks.

Try something like this:

WorksheetFunction.CountIf(Sheets("Sheet1").Range("C:C"),
Sheets("Sheet1").Range("C2"))

Hope this helps / Lars-Åke
 
Top