ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   countif from specific range (https://www.excelbanter.com/excel-discussion-misc-queries/142648-countif-specific-range.html)

shakey1181

countif from specific range
 
I am trying to count data which falls within a specific non-sequential range.
So i basically only want to count if the a1:a100 is equal to:
11,12,13,15,18,89,88,69,56, but i can't seem to find a way around it that
doesn't error

Would it help if i used a named range?

Thanks in advance.

Mike

countif from specific range
 
try this
=COUNTIF(A1:A100,11)+COUNTIF(A1:A100,12)+COUNTIF(A 1:A100,13)+COUNTIF(A1:A100,15)+COUNTIF(A1:A100,18) +COUNTIF(A1:A100,88)+COUNTIF(A1:A100,89)+COUNTIF(A 1:A100,69)+COUNTIF(A1:A100,156)

"shakey1181" wrote:

I am trying to count data which falls within a specific non-sequential range.
So i basically only want to count if the a1:a100 is equal to:
11,12,13,15,18,89,88,69,56, but i can't seem to find a way around it that
doesn't error

Would it help if i used a named range?

Thanks in advance.


PCLIVE

countif from specific range
 
Maybe one way:

=SUMPRODUCT(--(A1:A100={11,12,13,15,18,89,88,69,56}))

HTH,
Paul

"shakey1181" wrote in message
...
I am trying to count data which falls within a specific non-sequential
range.
So i basically only want to count if the a1:a100 is equal to:
11,12,13,15,18,89,88,69,56, but i can't seem to find a way around it that
doesn't error

Would it help if i used a named range?

Thanks in advance.




Peo Sjoblom

countif from specific range
 
Try

=SUM(COUNTIF(A1:A100,{11;12;13;15;18;56;89;88;69}) )


--
Regards,

Peo Sjoblom



"shakey1181" wrote in message
...
I am trying to count data which falls within a specific non-sequential
range.
So i basically only want to count if the a1:a100 is equal to:
11,12,13,15,18,89,88,69,56, but i can't seem to find a way around it that
doesn't error

Would it help if i used a named range?

Thanks in advance.





All times are GMT +1. The time now is 08:52 PM.

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