View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default How do I get the diagonal of a matrix from excel?

"Harlan Grove" wrote:
FWIW, can't use the expression above as a term in an array formula.
It's need to be
N(OFFSET(B2,ROW(INDIRECT("1:4"))-1,ROW(INDIRECT("1:4"))-1))


Thanks for correction, Harlan.

This can be done without volatile functions. As a column vector,
=MMULT((ROW(M)-MIN(ROW(M))=COLUMN(M)-MIN(COLUMN(M)))*M,
TRANSPOSE(COLUMN(M))^0)


I suppose M is a defined range referring to the matrix,
eg to the 4 x 4 grid in B2:E5

Does the N(..) need to be likewise applied here ?
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---