Thread
:
Sumproduct query
View Single Post
#
5
Posted to microsoft.public.excel.worksheet.functions
Don Guillett
external usenet poster
Posts: 10,124
Sumproduct query
One way
Sub countrowsif()
mc = "j"
For i = 2 To Cells(Rows.Count, mc).End(xlUp).Row
If Application.CountIf(Rows(i), "=" & "y") 0 Then
ms = ms + 1
End If
Next i
MsgBox ms
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Marc T" wrote in message
...
Hi,
I'm using sumproduct to count occurences for multiple criteria, but have a
question...
How can I use it for the following situation:
A B C
1 Y N Y
2 Y N N
3 N N N
4 Y Y Y
I'm looking to count every occurence of one or more Y.
Cheers
Marc
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett