IF-formulas can not return a range.
This is simple to fix, however, you need to edit the formula slightly.
If you have a formula looking like this
=SUMIF(M12:M14,G5,IF(I10="B & W",O12:O14,P12:P14))
make it look like this
=IF(I10="B & W",SUMIF(M12:M14,G5,O12:O14),SUMIF(M12:M14,G5,P12:P14))
So we moved the IF higher, and have two separate calls to SUMIF.

