1
votes

want to write excel formula that will sum the values based on a match of the rows. The cells to be matched can occur multiple times and basing on the Mapping legend they should return the sum of values.

In the yellow cells I am trying to calculate sum of values in range B9:B21 based on a match of the names in G3:G8 according to Mapping legend to Item1, then Item2 and Item 3. Also I want to consider the sum to be done across Date 1, Date 2 and Date 3. The SumProduct formula below works only if I use it on sum array for a single date but not across date1 , date2 and date 3:

enter image description here

Does sombody know how to fix this? I would like to add that I want to have the fomrula to be identical in each yellow cell without splitting the arrays across the dates. The more, it is important in the formula to have it on the basis that 'date 1', 'date2' and 'date3' are matched.

1

1 Answers

0
votes

Put this array formula into B2 with CSE then fill right and down.

=SUM(SUMIFS(INDEX($B$8:$D$19, 0, MATCH(B$1, $B$7:$D$7, 0)), $A$8:$A$19, IF($F$2:$F$7=$A2, $G$2:$G$7)))

enter image description here