SOLVED

COUNTIF and COUNTIFS giving different results

Copper Contributor

Windows10Pro and Microsoft 365 Apps for Business. Excel Ver 2107.

COUNTIF in one formula does not counts any of the cells, while the same formula on another column gives the correct answer: 1) =COUNTIF(C3:C282,"<60") 2) =COUNTIF(F3:F282,">4")

I changed the numbers from General to Number and get same result.  Same issue with COUNTIFS.

Thanks

 

 

 

6 Replies

@PhilipLibman 

Could you attach a sample workbook demonstrating the problem? Don't include any sensitive information.

@Hans Vogelaar 

Yes please see attached file. Thanks

best response confirmed by allyreckerman (Microsoft)
Solution

@PhilipLibman First of all, the "numbers" in column A and B were texts. Fixed that with Text-to-columns. Then, the second formula contains a typo. You used COUINTIF. Hence the #NAME? error. Remove the letter "I" marked in red and it shall work.

 

See attached.

 

Thanks! The typo is a silly error. I did change from text to numbers, but did it in "Format Cells" and it didn't take. Only Text to Column worked and allowed the formula to calculate correctly.
Much appreciated.

@PhilipLibman You're welcome. And just bare in mind that formatting a cell as Number doesn't change the content of the cell to a number if it had been entered/imported as a text. 

@Riny_van_Eekelen 

You learn something new every day!  Thanks again. 

1 best response

Accepted Solutions
best response confirmed by allyreckerman (Microsoft)
Solution

@PhilipLibman First of all, the "numbers" in column A and B were texts. Fixed that with Text-to-columns. Then, the second formula contains a typo. You used COUINTIF. Hence the #NAME? error. Remove the letter "I" marked in red and it shall work.

 

See attached.

 

View solution in original post