COUNTIF With two criteria

  • Thread starter Thread starter Boran Düzgün
  • Start date Start date
B

Boran Düzgün

How can i count rows with two criteria. I can use COUNTIF with only one
criteria... does it posible to count with two criteria..

For example, I need to count the A's in the column A1:A100 which satisfies
the condition "O" in column D1:D100.
 
=SUMPRODUCT(--(A1:A100="A"),--(D1:D100="O"))


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 
Try:

=SUMPRODUCT((A1:A100="A")*(D1:D100="O"))

--
HTH

Sandy
(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 
countif

if you do not insist on "countif" here is something to consider

Sub countCells()
Dim x As Variant
Range("your choice", Range("your choice").End(xlUp)).Select
For x = 5 To Selection.Rows.Count - 1

If ActiveCell.Value > your choice Or ActiveCell.Value < your choice or other choice Then
Range(your choice).Value = Range(your choice).Value + 1
End If
Next x
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Excel Need Countifs Formula Help 0
COUNTIFS with No Criteria 1
Countif, index and match 2
Access Dcount (multiple criteria) 3
Countif and Right functions 8
countif 4
Quartile function using criteria 1
Countif time syntax 6

Back
Top