In other words, criteria used in the SUMIFS function is joined with AND logic, not OR logic.
In simple scenarios, a simple solution is to use the SUMIFS function with an array constant.
SUMIFS function
The SUMIFS function sums the values in a range that meet multiple criteria.
To apply additional criteria, you will want to move to aformula based on SUMPRODUCT.
With two OR criteria, you’ll need to use horizontal and vertical arrays as explained above.
Note: this is an array formula and must be entered with control + shift + enter.
SUM Function
The Excel SUM function returns the sum of values supplied.
These values can be numbers, cell references, ranges, arrays, and constants, in any combination.
SUM can handle up to 255 individual arguments.