Re: countif on multiple items

Brian Barker <[email protected]> Fri, 27 Jan 2012 02:07:00 +0000
Newsgroups gmane.comp.openoffice.questions
Message-ID <[email protected]>
At 19:21 26/01/2012 -0600, Wade Smart wrote:
>I need a total based on two columns.
>
>For example:
>
>A1 = Black
>A3 = Dk Blue
>A9 = White
>
>C1 = x
>C3 =
>C9 = x
>
>If a1=Black AND c1 = x then count this as one.
>
>Can you count if with two columns?

Yes: =SUMPRODUCT(A1:A99="Black";C1:C99="x")

The conditions are either TRUE or FALSE.  When interpreted as 
numbers, these values are 1 and 0 respectively.  The product gives 1 
only if both components are 1, so it effectively ANDs the two 
conditions.  The resulting true (=1) values are then summed.

I trust this helps.

Brian Barker

-- 
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help