Using SUMIF when criteria is a formula
I am trying to sum only the values listed in a column when the values listed in that column are greater than the values in the corresponding cell in another column. I can get the result I want by using this formula "=SUM(IF(J5<M5,M5),IF(J6<M6,M6), ... IF(J337<M337, M337))", but I don't want to type in 332 "IF" statements. I tried to get the following "SUMIF" statement to work "=SUMIF(M5:M337, J5:J337<M5:M337, M5:M337)", but I'm not getting the correct result.
|