Combining certain matrices

D

dungeater

Can anyone think of a way to add certain matrices together, depending
on some matrix criteria?

Situation:

X Y Z
Bob A 2 3 1
Bob B 4 1 5
Bob C 3 2 6

X Y Z
Sue A 4 3 3
Sue B 4 1 5
Sue C 2 2 5

X Y Z
Bob A 2 3 1
Bob B 3 5 5
Bob C 5 2 1

X Y Z
Sue A 3 3 1
Sue B 4 1 2
Sue C 2 5 6

I want to combine all the matrices that belong to Bob, etc (ie. add all
A-X together, all B-X, etc). I'm not looking for an answer like, click
through and sum each manually!

Thanks
 
D

Domenic

Try the following array formula that needs to be confirmed with
CONTROL+SHIFT+ENTER...

=SUM(IF(ISNUMBER($C$2:$E$19),($A$2:$A$19=G1)*($B$2:$B$19=H1)*($C$1:$E$1=I
1)*($C$2:$E$19)))

....where G1 contains the name of interest, H1 contains either A, B, or
C, and I1 contains either X, Y, or Z.

Hope this helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top