ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   COUNTIF(AND Statement (https://www.excelbanter.com/excel-discussion-misc-queries/124206-countif-statement.html)

lccubb

COUNTIF(AND Statement
 
I'm trying to find how many times four specific numbers are used together in
each row. My formula is as follows:

=COUNTIF(AND(B2:F964,"2","19","35","41")))

I can not figure out what I have wrong.

Don Guillett

COUNTIF(AND Statement
 
change this to suit
=SUMPRODUCT((B3:B11={98,99})*1)

--
Don Guillett
SalesAid Software

"lccubb" wrote in message
...
I'm trying to find how many times four specific numbers are used together
in
each row. My formula is as follows:

=COUNTIF(AND(B2:F964,"2","19","35","41")))

I can not figure out what I have wrong.




Bob Phillips

COUNTIF(AND Statement
 
=SUM(COUNTIF(B2:F964,{"2","19","35","41"}))

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"lccubb" wrote in message
...
I'm trying to find how many times four specific numbers are used together
in
each row. My formula is as follows:

=COUNTIF(AND(B2:F964,"2","19","35","41")))

I can not figure out what I have wrong.





All times are GMT +1. The time now is 12:11 AM.

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