I am trying to count 1 and -1 in filtered data. The count for -1 is correct but for 1 it includes -1 as well and shows the count which is incorrect. If you look at the image att
=SUMPRODUCT(SUBTOTAL(102,OFFSET(B2:B11,ROW(B2:B11)-MIN(ROW(B2:B11)),,1))*(B2:B11=1)) to find count of 1's
=SUMPRODUCT(SUBTOTAL(102,OFFSET(B2:B11,ROW(B2:B11)-MIN(ROW(B2:B11)),,1))*(B2:B11=1))
=SUMPRODUCT(SUBTOTAL(102,OFFSET(B2:B11,ROW(B2:B11)-MIN(ROW(B2:B11)),,1))*(B2:B11=-1)) to find count of -1's
=SUMPRODUCT(SUBTOTAL(102,OFFSET(B2:B11,ROW(B2:B11)-MIN(ROW(B2:B11)),,1))*(B2:B11=-1))
Just lock the cells as necessary and you're good to go.