Hello,
I am trying to write a COUNTA formula that excludes blank cells.
I searched this forum and found that
does just that.![]()
=SUMPRODUCT(--(A1:A100<>""))
My question is what relevance does the "--" have?
Hello,
I am trying to write a COUNTA formula that excludes blank cells.
I searched this forum and found that
does just that.![]()
=SUMPRODUCT(--(A1:A100<>""))
My question is what relevance does the "--" have?
It is the double unary operator and is used to coerce Booleans (True/False) to their integer equivalents (1/0 respectively)
You might find you can achieve the same results using :
=ROWS(A1:A100)-COUNTBLANK(A1:A100)
Or, alternatively if there's some consistency in the formula results...
Always Text: =COUNTIF(A1:A100,"?*")
Always Number: =COUNT(A1:A100)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks