ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Countif with criteria (https://www.excelbanter.com/excel-worksheet-functions/71861-countif-criteria.html)

BSantos

Countif with criteria
 
Can someone help me write this formula correctly.

I have 2 columns

A B

1 1
1 5
1 6
1 10
2 1
2 12
2 20
3 4

I want to count all the ones that have 1 in column A in the range of 1 to 5
in B Column. And so forth for each # in column A.

Thanks B.


Kevin Vaughn

Countif with criteria
 
=SUMPRODUCT(--(A1:A8 = 1),--(B1:B8 = 1), --(B1:B8 <= 5))
--
Kevin Vaughn


"BSantos" wrote:

Can someone help me write this formula correctly.

I have 2 columns

A B

1 1
1 5
1 6
1 10
2 1
2 12
2 20
3 4

I want to count all the ones that have 1 in column A in the range of 1 to 5
in B Column. And so forth for each # in column A.

Thanks B.


Trevor Shuttleworth

Countif with criteria
 
=SUMPRODUCT((A1:A8=1)*(B1:B8=1)*(B1:B8<=5))

Regards

Trevor


"BSantos" wrote in message
...
Can someone help me write this formula correctly.

I have 2 columns

A B

1 1
1 5
1 6
1 10
2 1
2 12
2 20
3 4

I want to count all the ones that have 1 in column A in the range of 1 to
5
in B Column. And so forth for each # in column A.

Thanks B.





All times are GMT +1. The time now is 04:16 PM.

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