I tried using a union with braces {}
and FLATTEN
to combine 2 simple ranges as the first input in a SUMIF
formula. Neither worked. Summing 2 SUMIF
formula works of course but that's not really a solution but a short-term workaround.
=SUMIF({B3:B5;E3:E5},"yes",{A3:A5;D3:D5})
=SUMIF(FLATTEN(B3:B5,E3:E5),"yes",FLATTEN(A3:A5,D3:D5))
=SUMIF(B3:B5,"yes",A3:A5)+SUMIF(E3:E5,"yes",D3:D5)
I recommend this approach:
=SUM(FILTER({A:B;D:E},{B:B;E:E}="yes"))