Forum Discussion
SUMIFS - Can criteria be entered directly?
- May 01, 2020
Hi Sergei,
Thanks for this - your first suggestion works fine.
When I tried SUMIFS(A1:A4,{1,2,3,4},3) I just get a syntax error - Excel clearly does not like {1,2,3,4} in this formula but evaluates it OK in the SUMPRODUCT one. Strange?
thanks again
Peter
I didn't catch entire idea, perhaps that could be done another way, e.g. using CHOOSE(), but if literally when
=SUMPRODUCT(A1:A4*({1;2;3;4}=3))
or
=SUMPRODUCT(A1:A4*(ConstantsList=3))
if you name above array in Name Manager
- PeterYacMay 01, 2020Copper Contributor
Hi Sergei,
Thanks for this - your first suggestion works fine.
When I tried SUMIFS(A1:A4,{1,2,3,4},3) I just get a syntax error - Excel clearly does not like {1,2,3,4} in this formula but evaluates it OK in the SUMPRODUCT one. Strange?
thanks again
Peter
- SergeiBaklanMay 01, 2020Diamond Contributor
Peter, SUMIFS requires the range as argument, SUMPRODUCT works both with ranges and arrays.