Excel sum based on matrix condition

2019-08-14 14:09发布

问题:

I need to create dynamic sum formula in Excel with conditions based on a matrix table. I've represented an example below:

The sum val is based on what is selected in the matrix with an 'X'. If the 'X' changes to other references, the formula should be changed to reflect the change and sum the relevant values.

Any ideas?

回答1:

Please try:

=MMULT(--(B9:F9="X"),C$2:C$6)


标签: excel sum