ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   counting Criteria (https://www.excelbanter.com/excel-discussion-misc-queries/89858-counting-criteria.html)

Hemant

counting Criteria
 
Hi,

I have the following entry in a spreadsheet

Col A Col B
5a p
5a f
6 p
5a p
7 p

what summary I would like is as follows:

No. of "p":
5a = 2
6 = 1
7 = 1
No. of "f":
5a = 1
6 = 0
7 = 0

Is there way of couting on these criteria?

many thanks in advance

Hemant

Don Guillett

counting Criteria
 
have a look in help index for COUNTIF and SUMIF

--
Don Guillett
SalesAid Software

"Hemant" wrote in message
...
Hi,

I have the following entry in a spreadsheet

Col A Col B
5a p
5a f
6 p
5a p
7 p

what summary I would like is as follows:

No. of "p":
5a = 2
6 = 1
7 = 1
No. of "f":
5a = 1
6 = 0
7 = 0

Is there way of couting on these criteria?

many thanks in advance

Hemant




Bob Phillips

counting Criteria
 
=SUMPRODUCT(--($A$1:$A$100="5a"),--($B$1:$B$100="p"))

etc.

Note that SUMPRODUCT doesn't work with complete columns, you have to specify
a range.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Hemant" wrote in message
...
Hi,

I have the following entry in a spreadsheet

Col A Col B
5a p
5a f
6 p
5a p
7 p

what summary I would like is as follows:

No. of "p":
5a = 2
6 = 1
7 = 1
No. of "f":
5a = 1
6 = 0
7 = 0

Is there way of couting on these criteria?

many thanks in advance

Hemant




Hemant

counting Criteria
 
Many thanks Bob. The formula works.

"Hemant" wrote:

Hi,

I have the following entry in a spreadsheet

Col A Col B
5a p
5a f
6 p
5a p
7 p

what summary I would like is as follows:

No. of "p":
5a = 2
6 = 1
7 = 1
No. of "f":
5a = 1
6 = 0
7 = 0

Is there way of couting on these criteria?

many thanks in advance

Hemant



All times are GMT +1. The time now is 01:14 PM.

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