Max with multiple rules

table.ods (13.7 KB)

The table is used for calculation. Column A is the selling price, column B is the discount, column C is the price - discount x length.

I am looking for the highest price per meter including any discount. This works as long as there is no discount. But how can you use max if it gets a possible discount?

I had the idea combine max with if but this will not work.

Would be nice someone had an idea.



this in D2 do the right job. Maybe there other ways? But this is what had search.


In D9 you can use =SUMPRODUCT(MAX(A$14:A$15*E9)), sumproduct makes the formula matricidal, so max gets the maximum of the price*length pairs.


:slight_smile: Please, don’t kill the mother.

Maybe: makes the formula an array one.


1 Like