Re: countif on multiple items

Wade Smart <[email protected]> Thu, 26 Jan 2012 20:11:22 -0600
Newsgroups gmane.comp.openoffice.questions
Message-ID <CAK3k1ZFsOXvUyE3PNjNW5zjAHa1kb8s4YJWVJYnpDyOBpX8zQg@mail.gmail.com>
On Thu, Jan 26, 2012 at 20:07, Brian Barker <[email protected]> wro=
te:
> At 19:21 26/01/2012 -0600, Wade Smart wrote:
>>
>> I need a total based on two columns.
>>
>> For example:
>>
>> A1 =3D Black
>> A3 =3D Dk Blue
>> A9 =3D White
>>
>> C1 =3D x
>> C3 =3D
>> C9 =3D x
>>
>> If a1=3DBlack AND c1 =3D x then count this as one.
>>
>> Can you count if with two columns?
>
>
> Yes: =3DSUMPRODUCT(A1:A99=3D"Black";C1:C99=3D"x")
>
> The conditions are either TRUE or FALSE. =C2=A0When interpreted as number=
s, these
> values are 1 and 0 respectively. =C2=A0The product gives 1 only if both
> components are 1, so it effectively ANDs the two conditions. =C2=A0The re=
sulting
> true (=3D1) 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



Great! Thanks for that Brian :D
--
Registered Linux User: #480675
Registered Linux Machine: #408606
Linux since June 2005
--=20
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help