Created attachment 187812 [details] example for the suggestion for SUM.IF() I suggest accepting functions in the "criteria" parameter. Examples: > SUM.IF(E6:M6;AND(>0;<100);E7:M7) > SUM.IF(E6:M6;OR(AND(>0;<100);AND(>200;<300));E7:M7) A detailed example is joined.
I think SUM.IFS() that let's add several criteria, do what you need. https://help.libreoffice.org/latest/en-US/text/scalc/01/func_sumifs.html?DbPAR=CALC#bm_id658066580665806