Biff said:
AND requires every element to be TRUE. So, if every cell in A1:A100 = xyz
and every cell in B1:B100 = "" then it would work.
Well, yes. But I thought that an array formula of that form would be
evaluated like:
sum({if(and(a1="xyz",b1=""),c1,0), if(and(a2="xyz",b2=""),c2,0),...}).
In other words, I thought the Excel expression evaluator would "unwind"
the range references in the IF and AND parameters. I thought that is
why we must enter this formula with ctrl-shift-Enter instead of Enter.
I have relied on that assumption when writing other array formulas, for
example:
={exp(stdev(ln(a1:a99/a2:a100)))-1}
the formula I use to compute the std dev of the log returns of stock
prices. I expect that formula to be (and indeed it seems to be )
evaluated as:
exp(stdev({ln(a1/a2), ln(a2/a3),...})) - 1
But now I do see the syntactic ambiguity with the non-array-formula
form of AND. For example, =AND(A1:A10<11,B1:B10<11), entered with
Enter instead ctrl-shift-Enter, is true when all of A1:B10 are less
than 11, and false otherwise, as you say.
So is this simply a case of Excel resolving the syntactic ambiguity
differently than I expected?
And perhaps I should have expected it. I had not given any thought to
the fact that AND(rangeExpression) has meaning as non-array formula.
In contrast, apparently ln(rangeExpression) does not (fails with a
#Value error).
Hmm.... AND(range1Expression,range2Expression) does fail as a
non-array formula if the two ranges overlap. Klunk!
As this point, I better stop yapping and start listening, lest I dig
myself deeper into my own sh*t. I wish I had an academic understanding
of Excel expression evaluation and array formula evaluation in
particular.
Any insights about my ramblings would be greatly appreciated.