Is it possible to make something without the sumifs or is the and logic plus variety of bucket composition mean I am being a little too cute?
It is possible. It gets involved, though. In the attached it took me about an hour to work out this MMULT type solution.
If you don't work with MMULT regularly it can be confusing to use ... and I use it quite a bit.
By the way SUMIF also works (see attached).
If it were me I would stick with the SUMIF(S) solution.
Just to learn/run through formula. Index the full data range, match returns the row number, leaving column zero or blank forces index to pull the entire row of data in the selected data range. Then it is the normal sumifs with a sumproduct to handle the array generated by the index.
The SUMPRODUCT is to handle the array returned by the SUMIFS (due to the multiple criteria output by INDEX you described). This is a point often missed when new to SUMIFS and arrays ... (been there, done that and on occasion still miss that detail to this day. )
A point worth mentioning if the ranges of data are dynamic. The IFs family of functions can handle whole column / row references with little noticeable performance impact. You would need to make sure the formula is not in the referenced range. See in Sheet1(2) of the attached.
Bookmarks