close

=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;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()