The SUMIFS function, one of the math and trig functions, adds all of its arguments that meet multiple criteria.
https://support.microsoft.com/en-us/office/sumifs-function-c9e748f5-7ea7-455d-9406-611cebce642b
Free Excel add-in that quickly filters the source data for any SUMIFS, COUNTIFS, or AVERAGEIFS formula, and lists the fields and criteria for easy analysis and troubleshooting. This will save you lots of time when working with these long IFs formulas that can be difficult to read.