ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Count same text from different rows (https://www.excelbanter.com/excel-discussion-misc-queries/236054-count-same-text-different-rows.html)

kashish

Count same text from different rows
 
I have database like given below

A B C D E
Q2 a c c a
Q2 b a a a
Q1 d a a
Q2 c a
Q1 d a b a

I want to count how many "a" are there in different column for Q1, or how
many "c" are there in different column for Q2. (Q1 & Q2 are only in A column.)

Bob Phillips[_3_]

Count same text from different rows
 
=SUMPRODUCT(($A$1:$A$5="Q1")*($B$1:$E$5="a"))

etc.

--
__________________________________
HTH

Bob

"kashish" wrote in message
...
I have database like given below

A B C D E
Q2 a c c a
Q2 b a a a
Q1 d a a
Q2 c a
Q1 d a b a

I want to count how many "a" are there in different column for Q1, or how
many "c" are there in different column for Q2. (Q1 & Q2 are only in A
column.)




Mike H

Count same text from different rows
 
Try this

=SUMPRODUCT((A1:A20="Q2")*(B1:E20="a"))

Cahnge the criteria for your other counts

Mike

"kashish" wrote:

I have database like given below

A B C D E
Q2 a c c a
Q2 b a a a
Q1 d a a
Q2 c a
Q1 d a b a

I want to count how many "a" are there in different column for Q1, or how
many "c" are there in different column for Q2. (Q1 & Q2 are only in A column.)



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

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