The formula =COUNTIFS(D8:D19,"=apples",F8:F19,"=green") results in an answer of 2.
The formula =COUNTIFS(D8:D19,"=peppers",F8:F19,"=green") results in an answer of 3.
How to combine these formulii to get an answer of 5?
The formula =COUNTIFS(D8:D19,"=apples",F8:F19,"=green") results in an answer of 2.
The formula =COUNTIFS(D8:D19,"=peppers",F8:F19,"=green") results in an answer of 3.
How to combine these formulii to get an answer of 5?
Try this version
=SUM(COUNTIFS(D8:D19,{"apples","peppers"},F8:F19,"green"))
Audere est facere
You can try any of these functions
=SUMPRODUCT((D8:D19="Apples")*(D8:D19="Peppers")*(F8:F19="Green"))
=SUMPRODUCT(--(D8:D19="Apples"),--(D8:D19="Peppers"),--(F8:F19="Green"))
Please click 'Add reputation', if my answer helped you.
Those formulas will always return zero ramananhrm, because like COUNTIFS the SUMPRODUCT function with * works like an "AND", so D8:D19 would have to be both "apples" and "peppers" at the same time which isn't possible, for an OR version with SUMPRODUCT you'd need this syntax or similar:
=SUMPRODUCT((D8:D19="Apples")+(D8:D19="Peppers"),(F8:F19="Green")+0)
Daddy Longlegs, The SUM formula works exactly as needed. Thanks for your help. R/Phil
Last edited by Phil Hageman; 08-21-2013 at 09:31 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks