Sum a Filtered List excluding Negative Numbers

C

Chris waller

I wish to create a subtotal in a filtered list, which I know I could do using
the =sumproduct formula. However, I would like to know if it is possible to
exclude negative numbers from the sum. Is it possible?
 
J

Jacob Skaria

Can you elaborate by what you mean by 'filtered list' ?
Also post the formula which you use right now using SUMPRODUCT()?

'To exclude negative numbers from a list of numbers..
=SUMIF(A:A,">0")

PS: You might need to use =SUBTOTAL() function based on the exact
requirements.

If this post helps click Yes
 
C

Chris waller

The version of Excel I am using is 2002. The formula that I am currently
using is:- =SUBTOTAL(9,$D$2:$D$10), however I have found that
=SUMPRODUCT(SUBTOTAL(9,D2:D10)) gives the same answer. In relation to the
filtered list, column A contains a list of products and I need to be able to
sum the number of products shich the formula will do, however there are
instances where there are negative numbers in the list and I need to exclude
these from the equation, whilst the list is on screen. HTH
 
J

Jacob Skaria

Chris, try the below

=SUMPRODUCT(SUBTOTAL(3,OFFSET(D2:D10,ROW(D2:D10)-MIN(ROW(D2:D10)),0,1)),--(D2:D10>0),D2:D10)

If this post helps click Yes
 
C

Chris waller

Jacob,

Thanks for your prompt reply. It worked a treat. Thanks once again.
 
C

Chris waller

Domenic,

Thanks for that. It worked a treat. I will pass yours and Jacob's response
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top