View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Summing differences with multpile criteria

So which column should be subtracted from which column?

A-B or B-A

Try one of these:

A-B:

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

B-A:

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


--
Biff
Microsoft Excel MVP


"TT" wrote in message
...

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