Countif?

  • Thread starter Thread starter Helen
  • Start date Start date
H

Helen

(please forgive me if this is a duplicate posting...)

I'm trying to do the following:

Count how many cells (rows) in column A that has the value 1 in Column C AND
value 1 in Column D?

Any suggestions?

Helen
 
So ... what does Column A have to do with the count?
=Sumproduct((C1:C100=1)*(D1:D100=1))

Do you want to check if the cell in Column A contains *anything?
=Sumproduct((C1:C100=1)*(D1:D100=1)*(A1:A100<>""))

OR ... if Column A is *not* equal to 0?
=Sumproduct((C1:C100=1)*(D1:D100=1)*(A1:A100>0))
 
Helen,

You can only use COUNTIF (and SUMIF) when you have one condition - for
multiple conditions you need to use SUMPRODUCT, like so:

=SUMPRODUCT((C1:C100=1)*(D1:D100=1))

if you just want to count them, or this:

=SUMPRODUCT((C1:C100=1)*(D1:D100=1)*(A1:A100))

if you want to add them up.

Hope this helps.

Pete
 
If this is a real problem not just an example, (ie that there really will be
1's used), then a simple SUMIF() should do it:

=SUMIF(A1:A10,1,C1:C10)

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

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

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


Back
Top