# [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. ### 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 `(" ")`. • 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. ### 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")` 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. ## 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. 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*")` ## Related Articles 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 Advanced Excel Exercises with Solutions PDF  