6
2
As an example, I have the below formula:
=SUMIF(G1:G25,E1,H1:H25)+SUMIF(G1:G25,E2,H1:H25)+SUMIF(G1:G25,E3,H1:H25)
It is 3 SUMIFs all using the same criteria and sum range, the criteria uses 3 cells all in the same range.
I want to be able to condense this formula to something like the below:
=SUMIF(G1:G25,E1:E3,H1:H25)
where the criteria is the range of cells. I have tried:
{=SUMIF(G1:G25,E1:E3,H1:H25)}
&
=SUMIF(G1:G25,{E1:E3},H1:H25)
&
=SUM(SUMIF(G1:G25,{E1:E3},H1:H25))
Is there a way to achieve this ? perhaps even with SUMPRODUCT
?
Also, in place of the range E1:E3
I would like to use a named range, if possible, If not just a way of condensing the multiple SUMIFs will do for me.
You seem to have succeeded where I didn't so I deleted my wrong answer. You condensed the OP's formula a fair bit using SUPRODUCT, ISNUMBER and MATCH, and being there is the range
E1:E3
used, a named range can be used in its place. – Chris Rogers – 2019-04-16T11:44:43.4001I knew there would be a way using
SUMPRODUCT
, thanks Raj – PeterH – 2019-04-16T13:43:52.170@PeterH,, glad to help you.. please keep asking ☺ – Rajesh S – 2019-04-17T04:33:28.063