=SUMPRODUCT(COUNTIF(INDIRECT({quot;A1:C3quot;,quot;D4:F6quot;,quot;G7: I9quot;}),quot;Yquot;))
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
quot;Kurt Swansonquot; gt; wrote in message
...
gt; Is there any way to specify multiple disjoint ranges in one COUNTIF?
gt;
gt; I.e. something like COUNTIF((A1:C3,D4:F6,G7:I9),quot;Yquot;)
gt;
gt; I want to avoid COUNTIF(A1:C3,quot;Yquot;) COUNTIF(D4:F6,quot;Yquot;) ...
gt; --
gt; © 2005 Kurt Swanson AB
=SUMPRODUCT(COUNTIF(INDIRECT({quot;A1:C3quot;,quot;D4:F6quot;,quot;G7: I9quot;}),quot;Yquot;))
Nicely done, Bob! It works fine in my test.
***********
Regards,
Ron
XL2002, WinXP-Proquot;Bob Phillipsquot; wrote:
gt; =SUMPRODUCT(COUNTIF(INDIRECT({quot;A1:C3quot;,quot;D4:F6quot;,quot;G7: I9quot;}),quot;Yquot;))
gt;
gt; --
gt; HTH
gt;
gt; Bob Phillips
gt;
gt; (remove nothere from email address if mailing direct)
gt;
gt; quot;Kurt Swansonquot; gt; wrote in message
gt; ...
gt; gt; Is there any way to specify multiple disjoint ranges in one COUNTIF?
gt; gt;
gt; gt; I.e. something like COUNTIF((A1:C3,D4:F6,G7:I9),quot;Yquot;)
gt; gt;
gt; gt; I want to avoid COUNTIF(A1:C3,quot;Yquot;) COUNTIF(D4:F6,quot;Yquot;) ...
gt; gt; --
gt; gt; © 2005 Kurt Swanson AB
gt;
gt;
gt;
- Jul 25 Fri 2008 20:45
COUNTIF with multiple disjoint ranges, same criteria
close
全站熱搜
留言列表
發表留言