• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

COUNTIF if criteria is =

joannepan

New Member
Hello!


Assuming i have some values in cells in column A, such as 1, =, =, 1. If i countif that range for the number of "1", the answer is 2. But if I countif that range for the number of "=" the answer is 0 when it should be 2. How do i make it work?


Interestingly, it works for + and - but not =
 
Joannepan


Firstly, Welcome to the Chandoo.org forums


Try something like: =SUMPRODUCT(- -(A1:A10="="))
 
thanks both! I tried Narayan's method since it looked simpler and it works! Its funny though, why would it not work for = and only if its ==?
 
@joannepan,

In both formulas (from Hui and Narayan), the second "=" ensures you are comparing your data to the "=". If that second "=" is omitted, you are comparing your data to an empty string.


Cheers,

Sajan.
 
Back
Top