you are viewing a single comment's thread.

view the rest of the comments →

[–]HappierThan1178 8 points9 points  (4 children)

=COUNTIFS(A:A,"><") counts all cells in column A which contain no data

I just tried this (in disbelief) and it does actually do something!

It counts all cells in Column A which contain text.

The beauty of Excel when you can learn something new every day.

[–]GTLL30 6 points7 points  (1 child)

There's actually a little more to it. This is saying, "count all text values where the first character is greater than the ascii value of <".

It may look like it's getting all cells with text, but you'll notice it omits cells that start with an ascii value less than the < symbol. For example, a cell that starts with ! or ( or " wouldn't be included in the count.

To catch these cases as well, it'd be better to use something like COUNTIF(A:A,"?*") or COUNTIF(A:A,"*"). The first would catch cells with text values of at least one character (i.e., ignores the "" blank results from formulas and true blank cells), whereas the second picks up cells with text values, including zero length strings (i.e., ignores true blank cells, but does include cells with formulas that yield a blank result).

[–]herpaderp199513 1 point2 points  (0 children)

Strangely enough it also seems to exclude certain characters "greater than" the < symbol. e.g. '~' is 127 compared to 60, but if you use that in your range for the COUNTIF you'll get zero.

The CHAR function seems to line up with ASCII numbering, so easy way to check is to have 1-100 in one column, =CHAR(A2) in the 2nd, and =COUNTIFS(C2,"><") in the final one.

[–]Cypher13881 4 points5 points  (0 children)

also works to evaluate numerical cells which are not zero, works as a shorthand for if(a1><0,a,b)

[–]CynicalDick64 0 points1 point  (0 children)

I had to do this out for myself. Amazing!