Is there a way to use SUMIF to sum values in a column when they are greater than the value in the same row in the previous column? I'm working with a large dataset and I want to use a formula for different summing different segments of the data. I would prefer to avoid manipulating the data manually as it's quite large.
I have been trying array formulas like the below, but I want to add the segment as a criteria. So here, I'd only want the formula to return "150" for segment 1.
=SUM(IF(B:B>A:A,B:B))
Research SUMPRODUCT
:
=SUMPRODUCT(C:C,--(C:C>B:B),--(A:A="Segment1"))
Result:
Not sure if this would work with Excel-2010:
=SUM((C2:C7)*N((C2:C7>B2:B7)*(A2:A7="Segment1")))
You might need to enter both formulas with Ctrl + Shift + Enter