I am looking for an Excel formula which would produce the sum of all rows in a range, where a certain condition is met AND the rows are not filtered.
I know how to do each individually:
=SUMIF(A1:A10,">=0") for all positives for instance=SUBTOTAL(9,A1:A10)However, I am stumped on doing both at the same time. Is there any way to achieve this in a single formula without creating additional columns (no VBA)?
Try this formula
=SUMPRODUCT(SUBTOTAL(9,OFFSET(A1,ROW(A1:A10)-ROW(A1),0)),(A1:A10>0)+0)
change the condition at the end as required
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With