You could use some code like this:
<pre> With Application.WorksheetFunction
Range("a1") = .CountIf(Range("a2:e5"), ">=0") - .CountIf(Range("a2:e5"), ">2")
End With</pre>
This example code would count the cells with values between 0 and 2 in range A2:E5, and will put thre result in cell A1.
Last Wiki Answer Submitted: November 25, 2010 7:25 pm by carlosdl63,535 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.