sumif but additionally there maybe filtering

  • Thread starter Thread starter CousinExcel
  • Start date Start date
C

CousinExcel

Hi,

Column A | Column B | Column C
.... | 100 | $
.... | 50 | €
.... | 60 | $

=sumif(C1:C3;"$";B1:B3)
No problem until this point.

But, when I appply some filtration in column A, I need the sum to change.
When I write the formula as above, the sum does not change after filtration.

Thanks and regards,

Cousin Excel
 
Hi,

Try this

=SUMPRODUCT(--(C1:C10="$"),SUBTOTAL(9,OFFSET(B1:B10,ROW(B1:B10)-MIN(ROW(B1:B10)),0,1)))


--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
Back
Top