ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   I want to know how many times 2 corresponding cells meet a conditi (https://www.excelbanter.com/excel-discussion-misc-queries/81230-i-want-know-how-many-times-2-corresponding-cells-meet-conditi.html)

talderman

I want to know how many times 2 corresponding cells meet a conditi
 
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

Peo Sjoblom

I want to know how many times 2 corresponding cells meet a conditi
 
=SUMPRODUCT(--(A1:A3=1),--(B1:B3=2))

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com



"talderman" wrote in message
...
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




Toppers

I want to know how many times 2 corresponding cells meet a conditi
 

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

Or

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

where C1=1, D1=2

"talderman" wrote:

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


Dave O

I want to know how many times 2 corresponding cells meet a conditi
 
=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.


talderman

I want to know how many times 2 corresponding cells meet a con
 
Thank you I appreciate it those of you who replied. What does the -- mean
I'm not familiar with those
--
Tim


"Dave O" wrote:

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



talderman

I want to know how many times 2 corresponding cells meet a con
 
Thanks for your help what do the -- mean in the formula
--
Tim


"Toppers" wrote:


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

Or

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

where C1=1, D1=2

"talderman" wrote:

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


Peo Sjoblom

I want to know how many times 2 corresponding cells meet a con
 
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

http://nwexcelsolutions.com



"talderman" wrote in message
...
Thank you I appreciate it those of you who replied. What does the -- mean
I'm not familiar with those
--
Tim


"Dave O" wrote:

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






All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com