In Excel, you can use the COUNTIF function to count the cells that are not equal to a specific value you define. You need to specify the range of values to check and the criteria that you want to test.
In the following example, you have a list of values in form of numbers and now from here, you need to count the number of values that are not equal to zero.
- First, you need to enter the COUNTIF function in cell C1 and enter the starting parentheses.
- Next, select the range from which you want to count the values.
- After that, type a comma to move to the next argument.
- In the end, enter “<>0” in the criteria and close parentheses.
When you hit enter, it returns the count of the numbers that are not equal to zero.
Now as you can see you have used the symbol <> before the zero.
This symbol is a combination to lower than and greater than signs and when you use both signs collectively, it means “not equals”. You need to take care of one more thing you need to enclose the criteria in double quotation marks.