ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I perform a "Countif" function for Two Columns? (https://www.excelbanter.com/excel-worksheet-functions/12045-how-do-i-perform-%22countif%22-function-two-columns.html)

Syed Ali Zubair

How do I perform a "Countif" function for Two Columns?
 
I am facing problem that I want to count number of occurances of a set of
text spread in Two Columns. For example, I have two columns A and B. In
Column A, I have values F, B, L...In Column B, I have values F, M, N...Now I
wish to know that how many occurances are there in which the value in Column
A is "F" and Value in Column B, is "M".
I hope I am able to convey my problem effectively. Please help me in this
regard.

Aladin Akyurek

=SUMPRODUCT(--($A$2:$A$200="F"),--($B$2:$B$200="M"))

Syed Ali Zubair wrote:
I am facing problem that I want to count number of occurances of a set of
text spread in Two Columns. For example, I have two columns A and B. In
Column A, I have values F, B, L...In Column B, I have values F, M, N...Now I
wish to know that how many occurances are there in which the value in Column
A is "F" and Value in Column B, is "M".
I hope I am able to convey my problem effectively. Please help me in this
regard.


Leo Heuser

Syed

One way:

=SUMPRODUCT((A1:A100="F")*(B1:B100="M"))

or if you put Text of column A in D1 and text of column B in E1:

=SUMPRODUCT((A1:A100=D1)*(B1:B100=E1))


--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"Syed Ali Zubair" <Syed Ali skrev i en
meddelelse ...
I am facing problem that I want to count number of occurances of a set of
text spread in Two Columns. For example, I have two columns A and B. In
Column A, I have values F, B, L...In Column B, I have values F, M, N...Now

I
wish to know that how many occurances are there in which the value in

Column
A is "F" and Value in Column B, is "M".
I hope I am able to convey my problem effectively. Please help me in this
regard.





All times are GMT +1. The time now is 02:26 PM.

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