Whether you are running Microsoft 365 Excel or legacy Excel, our objective of a single, combined result is achieved the same way.
SUM Function to the Rescue
Our solution is to wrap (i.e., nest) the SUMIFS function within a SUM function.
=SUM(SUMIFS(D2:D28, A2:A28, G2, B2:B28, G3:H3) )
If you are running the legacy version of Excel, you will need to substitute the ENTER key with a CTRL-Shift-Enter key combination when you finalize the formula. This will place curly braces around your formula and commit it as an array formula.
“But I don’t like pressing CTRL-Shift-Enter.”
If you are not a fan of using the CTRL-Shift-Enter key combination to create “old-school” array formulas, you can use the SUMPRODUCT function instead of the SUM function when nesting the SUMIFS function.
=SUMPRODUCT(SUMIFS(D2:D28, A2:A28, G2, B2:B28, G3:H3) )
Using the SUMPRODUCT function is likely to be the safest approach of the two because it works in all versions of Excel. This is useful if you are sending this file to non-Microsoft 365 users.