ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Count the number between range of cell for a particular person (https://www.excelbanter.com/excel-discussion-misc-queries/448749-count-number-between-range-cell-particular-person.html)

faizzsheikh

Count the number between range of cell for a particular person
 
I want to count the numbers between 1 to 10 from the range for a particular person as seen in the below example.

Keyword Rank__________Person Name
1_____________John
5_____________Agnes
8_____________Agnes
12____________John
20____________Agnes
13____________Agnes
3_____________John
40____________John
8_____________John
15____________Agnes
10____________John


I want to count the the numbers that John has between 1 to 10 only. In the above case John must have 4 Keyword Ran between 1 to 10

Please help!


Thanks in advance
Faiz

Spencer101

Quote:

Originally Posted by faizzsheikh (Post 1611801)
I want to count the numbers between 1 to 10 from the range for a particular person as seen in the below example.

Keyword Rank__________Person Name
1_____________John
5_____________Agnes
8_____________Agnes
12____________John
20____________Agnes
13____________Agnes
3_____________John
40____________John
8_____________John
15____________Agnes
10____________John


I want to count the the numbers that John has between 1 to 10 only. In the above case John must have 4 Keyword Ran between 1 to 10

Please help!


Thanks in advance
Faiz


Hi Faiz,

Assuming your example data covers cells A1:B12 with the headers in row 1, you can use
=SUMPRODUCT((B2:B12="John")*(A2:A12=1)*(A2:A12<=1 0)) in any version of Excel or
=COUNTIFS(B2:B12,"John",A2:A12,"=1",A2:A12,"<=10" ) in Excel 2007 or later.

Kevin@Radstock

1 Attachment(s)
Hi faizzsheikh

So you want to count how many time John has a value between 1-10,try one of the following and assuming the data is in A1:B11

For Excel 2007: =COUNTIFS(B1:B11,"John",A1:A11,"=1",A1:A11,"<=10" )

For Excel 2003<: =SUMPRODUCT((B1:B11="John")*(A1:A11=1)*(A1:A11<=1 0))

Or a Pivot table

Kevin

Quote:

Originally Posted by faizzsheikh (Post 1611801)
I want to count the numbers between 1 to 10 from the range for a particular person as seen in the below example.

Keyword Rank__________Person Name
1_____________John
5_____________Agnes
8_____________Agnes
12____________John
20____________Agnes
13____________Agnes
3_____________John
40____________John
8_____________John
15____________Agnes
10____________John


I want to count the the numbers that John has between 1 to 10 only. In the above case John must have 4 Keyword Ran between 1 to 10

Please help!


Thanks in advance
Faiz


Claus Busch

Count the number between range of cell for a particular person
 
Hi,

Am Mon, 13 May 2013 08:07:41 +0100 schrieb faizzsheikh:

I want to count the numbers between 1 to 10 from the range for a
particular person as seen in the below example.

Keyword Rank__________Person Name
1_____________John
5_____________Agnes
8_____________Agnes
12____________John
20____________Agnes
13____________Agnes
3_____________John
40____________John
8_____________John
15____________Agnes
10____________John


try:
=COUNTIFS(C2:C12,"John",B2:B12,"<=10")
for xl2007 or later
else try:
=SUMPRODUCT(--(C2:C12="John"),--(B2:B12<=10))


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


All times are GMT +1. The time now is 02:50 AM.

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