Summing differences with multpile criteria

T

TT

I want to sum the difference between each row in 2 columns of data for each
case where row(i) in column A > 0 and row(i) in column B is less than column A
 
T

T. Valko

So which column should be subtracted from which column?

A-B or B-A

Try one of these:

A-B:

=SUMPRODUCT(--(A1:A10>0),--(B1:B10<A1:A10),A1:A10-B1:B10)

B-A:

=SUMPRODUCT(--(A1:A10>0),--(B1:B10<A1:A10),B1:B10-A1:A10)
 

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