ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count if (https://www.excelbanter.com/excel-worksheet-functions/217694-count-if.html)

BC

Count if
 
I have numbers in A1:A100, lets say 1 - 100. I also have a number in C11 and
a number in E11. How do I get a count of how many numbers in A1:A100 fall
between C11 and E11?

Thanks

Rick Rothstein

Count if
 
Try this formula if "between" meant not to count the values in C11 and
E11...

=SUMPRODUCT((A1:A100C11)*(A1:A100<E11))

Try this formula if "between" meant to include them...

=SUMPRODUCT((A1:A100=C11)*(A1:A100<=E11))

--
Rick (MVP - Excel)


"BC" wrote in message
...
I have numbers in A1:A100, lets say 1 - 100. I also have a number in C11
and
a number in E11. How do I get a count of how many numbers in A1:A100 fall
between C11 and E11?

Thanks



BC

Count if
 
Thanks Rick, just what I needed

"Rick Rothstein" wrote:

Try this formula if "between" meant not to count the values in C11 and
E11...

=SUMPRODUCT((A1:A100C11)*(A1:A100<E11))

Try this formula if "between" meant to include them...

=SUMPRODUCT((A1:A100=C11)*(A1:A100<=E11))

--
Rick (MVP - Excel)


"BC" wrote in message
...
I have numbers in A1:A100, lets say 1 - 100. I also have a number in C11
and
a number in E11. How do I get a count of how many numbers in A1:A100 fall
between C11 and E11?

Thanks




BC

Count if
 
But what if 2 or more of the numbers in A1:A100 are the same?

"Rick Rothstein" wrote:

Try this formula if "between" meant not to count the values in C11 and
E11...

=SUMPRODUCT((A1:A100C11)*(A1:A100<E11))

Try this formula if "between" meant to include them...

=SUMPRODUCT((A1:A100=C11)*(A1:A100<=E11))

--
Rick (MVP - Excel)


"BC" wrote in message
...
I have numbers in A1:A100, lets say 1 - 100. I also have a number in C11
and
a number in E11. How do I get a count of how many numbers in A1:A100 fall
between C11 and E11?

Thanks





All times are GMT +1. The time now is 03:59 AM.

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