Max wrote...
Thanks for correction, Harlan.
Wasn't a correction per se. Your formula works when entered as an array
formula into 1-column by 4-row ranges, but
=SUMPRODUCT(OFFSET(B2,ROW(INDIRECT("1:4"))-1,ROW(INDIRECT("1:4"))-1))
returns #VALUE! errors while
=SUMPRODUCT(N(OFFSET(B2,ROW(INDIRECT("1:4"))-1,ROW(INDIRECT("1:4"))-1)))
returns expected results.
I suppose M is a defined range referring to the matrix,
eg to the 4 x 4 grid in B2:E5
Correct.
Does the N(..) need to be likewise applied here ?
Why don't you test it? Hint, try the array formula
=SUM(MMULT((ROW(M)-MIN(ROW(M))=COLUMN(M)-MIN(COLUMN(M)))*M,
TRANSPOSE(COLUMN(M))^0))
It has to be an array formula because both MMULT and TRANSPOSE require
array formula entry.