ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting formula (https://www.excelbanter.com/excel-worksheet-functions/125197-counting-formula.html)

TMF in MN

Counting formula
 
A B
1 Bob 3
2 Bob 10
3 Sue 10

7 8-13 13-20

Bob 1 1 0
Sue 0 1 0
Jeff 0 0 0

Based on the first table, I would like a formula in the second table that
calculates how many of their numbers fall into the specific categories of 7,
8-13, etc.

THANK YOU







Teethless mama

Counting formula
 
=SUMPRODUCT(--(A1:A100="Bob"),--(B1:B1007))

=SUMPRODUCT(--(A1:A100="Bob"),--(B1:B100=8),--(B1:B100<=13))


"TMF in MN" wrote:

A B
1 Bob 3
2 Bob 10
3 Sue 10

7 8-13 13-20

Bob 1 1 0
Sue 0 1 0
Jeff 0 0 0

Based on the first table, I would like a formula in the second table that
calculates how many of their numbers fall into the specific categories of 7,
8-13, etc.

THANK YOU







Ron Coderre

Counting formula
 
Try something like this:

With
A1:B3 contains your sample data

Then enter these values in A6:D7
Low 7 8 14
High 999999 13 20

And these values in A9:D9
Name 7 8 - 13 14 - 20

AND...A10:A12
Bob
Sue
Jeff

Next:
B10: =SUMPRODUCT(($A$1:$A$3=$A10)*($B$1:$B$3=B$6)*($B$ 1:$B$3<=B$7))
Copy that formula across and down thru D12

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"TMF in MN" wrote:

A B
1 Bob 3
2 Bob 10
3 Sue 10

7 8-13 13-20

Bob 1 1 0
Sue 0 1 0
Jeff 0 0 0

Based on the first table, I would like a formula in the second table that
calculates how many of their numbers fall into the specific categories of 7,
8-13, etc.

THANK YOU








All times are GMT +1. The time now is 03:41 PM.

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