Thread: countif
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
excelent excelent is offline
external usenet poster
 
Posts: 695
Default countif

Sub RowCount()
Dim x, Xcount
For Each x In Selection
If x.Value < 0 Then Xcount = Xcount + 1
Next
MsgBox ("Numbers of rows < 0 : ") & Xcount
End Sub