Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
iif(col1="Green",1,0)+iif(Col2="Green",1,0) etc etc
Public Function basCountOf(varCountof As Variant, ParamArray varMyVals() As Variant) As Variant
'Michael Red 10/12/2006
'To return the count or a series of values which are equal to an argument (varCountOf)
'Sample Usage" _
? basCountOf("Green", "REd", "Blue", "green", "Green", "yellow", , "GrEeN", "Green") _
4
Dim Idx As Integer
Dim MyVal As Variant
For Idx = 0 To UBound(varMyVals())
If (IsMissing(varMyVals(Idx))) Then
GoTo NextVal
End If
If (varMyVals(Idx) = varCountof) Then
MyVal = MyVal + 1
End If
NextVal:
Next Idx
basCountOf = MyVal
End Function