Harlan, there's no way in hell that I can or wish to enter into any sort of
debate with you concerning the finer, or less then finer points of XL.
However, just because Redmond chose not to create an ISEMPTY function,
doesn't change the logical meaning of the term "empty cell".
I would guess that 99% of the folks around here would agree that an "empty"
cell contains *nothing*, while a "blank" cell *might* contain 'zero length
strings'.
No matter how "right" you may be, it doesn't change the general consensus of
the meaning.
I do bow to your superior knowledge of the program and also to your
unremitting persistence in pursuing a topic to a conclusion favorable to
your opinions.
For that reason, I state here that "empty" means *containing nothing*, and I
leave this thread, and acquiesce the last word to you.
--
Regards,
RD
----------------------------------------------------------------------------
-------------------
Please keep all correspondence within the Group, so all may benefit !
----------------------------------------------------------------------------
-------------------
RagDyer said:
Appreciate the input Harlan ... BUT ... as is often discussed here, an empty
cell is *empty*, which means it cannot contain a formula that *might*
evaluate to a zero length string.
....
Blank is proper terminology. 'Empty' is ambiguous. There's an ISBLANK
worksheet function. There's no ISEMPTY worksheet function. Get your
terminology right.
Also, test. With A1:A20 blank, what does your original formula,
=INDEX(A1:A20,MODE(MATCH(A1:A20&"",A1:A20&"",0)))
return? Now enter the formula ="" in cell A1. Does your original
formula now return "" ?
But to really make sure, change your formula to
=ISBLANK(INDEX(A1:A20,MODE(MATCH(A1:A20&"",A1:A20&"",0))))
and clear A1:A10 and enter 0 in A11:A20. Does this formula return TRUE?
What you're failing to understand, whether you've read it or not
before, is that when Excel expects to use values, it EVALUATES blank
cells as 0 in numeric and AMBIGUOUS contexts and as "" in text
contexts. First argument to MATCH is an ambiguous context. The second
argument to MATCH isn't usually evaluated. That why with A1:A2 blank,
the formula
=MATCH(A1,A1:A2,0)
returns #N/A, but enter 0 in A2 and it returns 2. The INDEX calls above
return a cell reference. When the referenced cell is blank, it's not
immediately evaluated. That's why the ISBLANK(INDEX(...)) formula above
returns TRUE (it's blank) rather than FALSE (it's 0 or ""). However,
the =INDEX(...) formula forces Excel to evaluate the blank cell, and
since it's not a text context, Excel evaluates it as 0.
I *did* stipulate "empty" in my instructions (explanation).
Yes, but you misunderstood what your formula does. Thus your erroneous
comment, 'and also count empty cells as "0".' For example, enter the
following formula in C1.
=INDEX(A1:A5,MODE(MATCH(A1:A5&"",A1:A5&"",0)))
Enter ="" in A1, 0 in A2 and A3 and leave A4 and A5 blank. If blank
cells match cells evaluating to 0, wouldn't the most frequent value be
0? Does this formula return 0?
I failed to mention 'nulls' ( "" or zero length strings) primarily because I
didn't think to test for them.
OK, but that's what blank cells match in your formula.
So, thanks to you, the OP should now be aware that a return of zero means
*empty* cells are prevalent, *or* a blank cell return would mean that he has
"" cells within his range of interest.
Wrong again because you still don't understand what's going on no
matter how pedantic you're trying to sound.
The problem with your formula is that when it returns 0 it's ambiguous
because it could mean either that 0 is the most frequently occurring
value OR that there are more blank cells or cells evaluating to "" than
any other value and the first of those cells is blank. A return value
of "" indicates that cells evaluating to "" and blank cells TOGETHER
are most frequently occurring AND that the first of these cells
evaluates to "".
To perhaps *simplify* the entire situation (on my part), let's use this
formula instead:
=INDEX(A1:A20&"",MODE(MATCH(A1:A20&"",A1:A20&"",0)))
Still ambiguous, though a different ambiguity. Now there'd be no way to
distinguish between cells evaluating to numeric 0 or text "0".
And then let's just say that a *blank cell* return signifies that *blank*
cells, which include empty as well as "" cells, are prevalent in the range
of interest!
....
To repeat, get your terminology right. BLANK means no cell contents, as
in the ISBLANK worksheet function. Empty is a term without specific
meaning, but could be used to mean "", though zero-length string is
more precise.
Lest you believe COUNTBLANK rather than ISBLANK governs the
terminology, from online help for COUNTBLANK: "Counts empty cells in a
specified range of cells." So it appears 'empty' may be defined as
cells evaluating to "" or blank. So you've got the terms 'empty' and
'blank' exactly backwards. Please attempt to learn the correct usage.