Requesting a SUMPRODUCT (or other) command that will give a count of rows where all of the following three things are true:
column A = P
(column B = Q or column B = R)
column C = S
Last edited by JakePatuli; 08-27-2009 at 10:09 AM.
=SUMPRODUCT(--(A1:A10="p"),--(B1:B10="r")+(B1:B10="q"),--(C1:C10="s"))
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
Martin, minor point, given you are adding the Boolean output of r & q to give effect of OR clause you need not coerce the r test with double unary, the addition operation will coerce by default, ie:
Another variant would beCode:=SUMPRODUCT(--(A1:A10="p"),(B1:B10="r")+(B1:B10="q"),--(C1:C10="s"))
Code:=SUMPRODUCT(--(A1:A10="p"),--ISNUMBER(MATCH(B1:B10,{"q","r"},0)),--(C1:C10="s"))
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
ok but i had a couple of spare - lying around from an old formula and wanted to use them up lol
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
I wanna play!
=SUMPRODUCT(--(A1:A10&B1:B10&C1:C10={"prs","pqs"}))
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
hey, there's only room for one smart-a$$ round here![]()
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks