close

I have 2 columns of numbers I would like to know how many times the value in
column A meets a certain value in column B.
ex)
column A column B
row1 1 2
row2 1 2
row3 1 2

How many times does the value 1 in column A match the corrspond value of 2
in column B. For clarity in this example it occurs 3 times?
--
Tim

=SUMPRODUCT(--(A1:A3=1),--(B1:B3=2))

--

Regards,

Peo Sjoblom

nwexcelsolutions.com
quot;taldermanquot; gt; wrote in message
...
gt;I have 2 columns of numbers I would like to know how many times the value
gt;in
gt; column A meets a certain value in column B.
gt; ex)
gt; column A column B
gt; row1 1 2
gt; row2 1 2
gt; row3 1 2
gt;
gt; How many times does the value 1 in column A match the corrspond value of 2
gt; in column B. For clarity in this example it occurs 3 times?
gt; --
gt; Tim

=SUMPRODUCT(--(A1:A5=1),--(B1:B5=2))

Or

=SUMPRODUCT(--(A1:A5=C1),--(B1:B5=D1))

where C1=1, D1=2

quot;taldermanquot; wrote:

gt; I have 2 columns of numbers I would like to know how many times the value in
gt; column A meets a certain value in column B.
gt; ex)
gt; column A column B
gt; row1 1 2
gt; row2 1 2
gt; row3 1 2
gt;
gt; How many times does the value 1 in column A match the corrspond value of 2
gt; in column B. For clarity in this example it occurs 3 times?
gt; --
gt; Tim

=SUMPRODUCT(--(A1:A3=1),--(B1:B3=2))

The 1 and the 2 are hardcoded into this formula, but can just as easily
reference other cells with those values.Thank you I appreciate it those of you who replied. What does the -- mean
I'm not familiar with those
--
Timquot;Dave Oquot; wrote:

gt; =SUMPRODUCT(--(A1:A3=1),--(B1:B3=2))
gt;
gt; The 1 and the 2 are hardcoded into this formula, but can just as easily
gt; reference other cells with those values.
gt;
gt;

Thanks for your help what do the -- mean in the formula
--
Timquot;Toppersquot; wrote:

gt;
gt; =SUMPRODUCT(--(A1:A5=1),--(B1:B5=2))
gt;
gt; Or
gt;
gt; =SUMPRODUCT(--(A1:A5=C1),--(B1:B5=D1))
gt;
gt; where C1=1, D1=2
gt;
gt; quot;taldermanquot; wrote:
gt;
gt; gt; I have 2 columns of numbers I would like to know how many times the value in
gt; gt; column A meets a certain value in column B.
gt; gt; ex)
gt; gt; column A column B
gt; gt; row1 1 2
gt; gt; row2 1 2
gt; gt; row3 1 2
gt; gt;
gt; gt; How many times does the value 1 in column A match the corrspond value of 2
gt; gt; in column B. For clarity in this example it occurs 3 times?
gt; gt; --
gt; gt; Tim

They just convert the Boolean values TRUE or FALSE into 1 or 0 thus you can
use SUMPRODUCT's built in format as opposed to multiplying the ranges with
each other. You can use 0 or 1* or N as well--

Regards,

Peo Sjoblom

nwexcelsolutions.com
quot;taldermanquot; gt; wrote in message
...
gt; Thank you I appreciate it those of you who replied. What does the -- mean
gt; I'm not familiar with those
gt; --
gt; Tim
gt;
gt;
gt; quot;Dave Oquot; wrote:
gt;
gt;gt; =SUMPRODUCT(--(A1:A3=1),--(B1:B3=2))
gt;gt;
gt;gt; The 1 and the 2 are hardcoded into this formula, but can just as easily
gt;gt; reference other cells with those values.
gt;gt;
gt;gt;

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

    software

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