View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bill[_39_] Bill[_39_] is offline
external usenet poster
 
Posts: 11
Default Countif Function


Hello,
I am missing something simple here I think. I have some data in column
A. I would like to count the data based on criteria; either above some
value, below some value or between two values. I started with the
simple above some value and used the following code:

Sub test()
Dim Minv, Maxv
Application.Goto reference:="aaa"
Minv = 0
MsgBox Application.CountIf(Selection, " & Minv & ")
End Sub

aaa is the named reference containing the data and is OK. All but one
entry is above 0, but the above codes give him 0 for the countif.

What am I doing wrong? Thanks

Bill


*** Sent via Developersdex http://www.developersdex.com ***