[Fixed!] Excel COUNTIF Function Not Working for String “True”

Get FREE Advanced Excel Exercises with Solutions!

The COUNTIF function is one of the most useful functions in Excel. It is used to count values if the function is true for the given criteria. But sometimes this function may not work when you try to count the string “True”. Here, we will give you 3 possible solutions when the Excel COUNTIF function is not working for the string “True”.


How to Fix When Excel COUNTIF Function Is Not Working for String “True”: 3 Possible Solutions

Here, we have a dataset where we have the Name of some students and the status of whether they have submitted their assignments or not. Now, we will use this dataset to give some solutions to your problem regarding using the COUNTIF function to count True.

Possible Solutions When Excel COUNTIF Function Is Not Working for String “True”


1. Add Double Quotation Mark While Counting True with COUNTIF Not Working in Excel

When you are counting any string value in Excel using the COUNTIF function make sure you have added a double quotation mark (" ").

  • Suppose, you have used a single quotation mark (' ') instead of a double quotation mark (" ").

Add Double Quotation Mark While Counting True with COUNTIF Not Working in Excel

  • Then, it may show an error like the image given below.

Solution:

To avoid this kind of error, follow the steps given below.

  • Firstly, select Cell C13 and insert the following formula.
=COUNTIF(C5:C11,"TRUE")
  • Finally, press Enter to get the count value.

Excel COUNTIF True Not Working

Read More: [Solved!]: Excel COUNTIF Returning 0 Instead of Actual Value


2. Input Correct Range Reference If COUNTIF Function Stops Working for True

Next, check if you have inserted the wrong cell range as reference in the COUNTIF function. This may return a wrong value or error.

Here, in the image given below, you can see that we have inserted cell range B5:B11 instead of cell range C5:C11 in the COUNTIF function. That’s why the function has returned 0 as a result.

Solution:

To solve this issue, insert the following formula in Cell C13.

=COUNTIF(C5:C11,"TRUE")

Input Correct Range Reference If COUNTIF Function Stops Working for True

Read More: [Fixed] COUNTIF Function with Wildcard Not Working in Excel


3. Insert Wildcards When COUNTIF Function Is Not Working for String “True”

Sometimes, your dataset may contain blanks in the cells. That’s why the COUNTIF function may not work properly.

Solution:

For datasets that contain blanks, you can use different Wildcards. Here, we will use asterisk (*) as a wildcard to solve this issue.

  • Firstly, select Cell C13 and insert the following formula.
=COUNTIF(C5:C11,"*True*")
  • After that, press Enter.

Insert Wildcards When COUNTIF Function Is Not Working for String “True”


Excel COUNTIF Function Not Working with Text

You can count any text value using the COUNTIF function. However, sometimes raw dataset may have blanks before or after the text. In those cases, this function does not work properly.

Here, we have a dataset containing some students’ assignment submission statuses. “Y” represents an assignment that has been submitted and “N” represents not submitted. Now, if we try to count “Y” using the COUNTIF function, it returns 0.

Excel COUNTIF Function Not Working with Text

Solution:

In such cases, try to use asterisk (*) as a wildcard to solve the error created by blank spaces.

Here, we will insert the following formula in Cell C13 which will return the count value perfectly.

=COUNTIF(C5:C11,"*Y*")

Read More:  Excel COUNTIF to Count Cell That Contains Text from Another Cell


Download Practice Workbook

You can download the workbook to practice yourself.


Conclusion

So, in this article, we have shown you 3 ways to solve the issues when Excel COUNTIF function is not working for the string “True”. I hope you found this article interesting and helpful. However, if something seems difficult to understand, please leave a comment. Additionally, please let us know if there are any more alternatives that we may have missed.


Related Articles

Arin Islam
Arin Islam

Hello, I'm Arin. I graduated from Khulna University of Engineering and Technology (KUET) from the Department of Civil Engineering. I am passionate about learning new things and increasing my data analysis knowledge as well as critical thinking. Currently, I am working and doing research on Microsoft Excel and here I will be posting articles related to it.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo