Link to home
Start Free TrialLog in
Avatar of Euro5
Euro5Flag for United States of America

asked on

Using OR in a COUNTIFS statement

=COUNTIFS(Static!A2:A78438,OR(120,121),Static!B2:B78438,"NO PRICING")

This is returning 0 when there are over 1000.
Any ideas what could be wrong?

I want to count how many say NO PRICING in column B when there are either 120 or 121 in column A.

Thanks!
Avatar of Shanan212
Shanan212
Flag of Canada image

I would say

=COUNTIFS(Static!A2:A78438,"=120",Static!B2:B78438,"NO PRICING")+COUNTIFS(Static!A2:A78438,"=121",Static!B2:B78438,"NO PRICING")

Being the easy solution
ASKER CERTIFIED SOLUTION
Avatar of barry houdini
barry houdini
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This will also work: allows for numbers between a range not just 120-121

=COUNTIFS(Static!B2:B78438,"NO PRICING",Static!A2:A78438,">=120",Static!A2:A78438,"<=121")
Avatar of Euro5

ASKER

Thanks so much!! Perfect!