Forum Discussion
mmclane
Feb 16, 2023Copper Contributor
Help with SUMPRODUCT formula - Include 0 and 1 but not 10
Hello! I have a column that contains numbers 0 through 10. I'd like to count (with filter) cells that are <=6. I have this formula, but it is including cells with 10. How do I exclude 10? =SUMPRODUC...
OliverScheurich
Feb 16, 2023Gold Contributor
=SUMPRODUCT(SUBTOTAL(3,OFFSET(G2:G286,ROW(G2:G286)-MIN(ROW(G2:G286)),,1))*((G2:G286=0)+(G2:G286=1)+(G2:G286=2)+(G2:G286=3)+(G2:G286=4)+(G2:G286=5)+(G2:G286=6)))
This returns the expected result if i correctly understand what you want to do.
mmclane
Feb 16, 2023Copper Contributor
OliverScheurich This works perfectly, thank you!