Forum Discussion
sanaouachani
Sep 09, 2022Copper Contributor
Formula SUMPRODUCT with all criteria in the same column
Hi,
I want to use the SUMPRODUCT formula and copy the same formula in all the table.
For some lines, there are no criteria, so I need to replace the criteria by something that means all.
I know that with SUMIF formula I can use <> to take into account all the raw. but it doesn't work with SUMPRODUCT
=+SOMMEPROD(($B$6:$B$23=F6)*($C$6:$C$23=G6)*($D$6:$D$23))
So in this example I want to replace "?TOUS LES CRITERES?" in cells G6 by a criteria that mean "all".
thank you for your help
thanks
Sana
- DexterG_IIIIron Contributor
sanaouachanisanaouachani Here's a formula that will include all records for that column if the condition cell is blank.
=SUMPRODUCT(IF(ISBLANK(F6),1,($B$6:$B$23=F6))*IF(ISBLANK(G6),1,($C$6:$C$23=G6))*($D$6:$D$23))
Hope this helps,
Dexter
- sanaouachaniCopper Contributor
DexterG_III thanks for your ansuar.
M'y formula ils already complicated. I need a code to replace G6
- DexterG_IIIIron Contributor
sanaouachani try this?
=SUMPRODUCT(IF(ISBLANK(F6),1,($B$6:$B$23=F6))*IF(G6="?TOUS LES CRITERES?",1,($C$6:$C$23=G6))*($D$6:$D$23))