No, It is Immpossible. COUNTIF analyzes the condition using some interpretation that is different from comparisons in normal Excel formulas.
In double quotes, the comparison operator at the beginning can be parsed: =,>,> =, <=, <, <>
After that, everything will be either a number or a string. Everything that cannot be parsed as a number will be parsed as a string. A comparison is then performed depending on whether it is a number or a string.
Comparison of numbers ignores strings and comparisons of strings ignore numbers.
"> 3" will count all numbers greater than 3. It ignores all lines.
"> c" will count all lines greater than c (that is, everything starting with c, followed by another character or something, starting with a higher character code). He ignores all numbers.
"> 3 *" will count all lines more than character 3.
When you try to make a ">" ", the character" "is used to denote the character" (because it is enclosed in double quotation marks in the formula), so the comparison you are actually doing here: more than "character. Raise the Unicode diagram and youβll only see it! less than. " So, if you put, followed by something or "by itself, if your data, you will get fewer points."
Similarly, ">" "" "is simply compared to a string consisting of two double quotes, not an empty string.
Cannot pass empty string to COUNTIF function.
You will need another solution:
Modify the previous IF statements to return any value other than nullstring that can be verified in the COUNTIF statement. You can even use CHAR(1) to display a non-printable character that appears blank but can still be excluded in COUNTIF: =COUNTIF(D1:D8,"<>"&CHAR(1))
Use multiple COUNTIFs that count the number of lines and the number of numbers: =COUNTIF(D1:D8,"?*")+COUNTIF(D1:D8,">0") (> 0 is used provided that there are only positive numbers in Otherwise, you will also need to add the number of numbers that are equal to <= 0)
Use other features suggested by other users.
Michael
source share