ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   COUNTIF with OR (https://www.excelbanter.com/excel-worksheet-functions/202743-countif.html)

giaraf

COUNTIF with OR
 
I'd like to use COUNT IF with OR. My criteria a A2:A300 OR B2:B30=2

I found plenty of posts on how to do COUNTIF where two criteria must both be
true but I couldn't find any advice on COUNTIF where only one or the other
criterion must be true.

T. Valko

COUNTIF with OR
 
Try this:

=SUMPRODUCT(--((A2:A300)+(B2:B30=2)0))

--
Biff
Microsoft Excel MVP


"giaraf" wrote in message
...
I'd like to use COUNT IF with OR. My criteria a A2:A300 OR B2:B30=2

I found plenty of posts on how to do COUNTIF where two criteria must both
be
true but I couldn't find any advice on COUNTIF where only one or the other
criterion must be true.





All times are GMT +1. The time now is 08:24 AM.

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