Joop
Joop

Reputation: 25

Determine max value of two matrices in single cell

I have two single column matrices named Matrix1 and Matrix2 in Excel, for instance:

Matrix1  Matrix 2
    0       7
    3       8
    9       3
    5       2
    1       6

I want to determine the maximum value of the sums of each row and I think this is possible using an array formula but I can't get to a working solution. So basically what I want to do is the following, but in a single cell:

Matrix1  Matrix2  Matrix3
    0       7       =index(Matrix1;1) + index(Matrix2;1)
    3       8       =index(Matrix1;2) + index(Matrix2;2)
    9       3       =index(Matrix1;3) + index(Matrix2;3)
    5       2       =index(Matrix1;4) + index(Matrix2;4)
    1       6       =index(Matrix1;5) + index(Matrix2;5)

Result = Max(Matrix3)

Is this possible in a singel cell?

Maybe for some inspiration, take a look at this post:

https://superuser.com/questions/373588/how-do-i-calculate-the-sum-of-2-columns-using-the-max-from-each-row

Upvotes: 2

Views: 152

Answers (1)

user4039065
user4039065

Reputation:

Try,

=MAX(INDEX((A2:A6)+(B2:B6), , ))

enter image description here

Upvotes: 1

Related Questions