Suppose I have the following data
[TABLE="width: 500"]
<tbody>[TR]
[TD]Alex[/TD]
[TD]01/07/18[/TD]
[TD]10000[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD]09/07/18[/TD]
[TD]20000[/TD]
[/TR]
[TR]
[TD]Alex[/TD]
[TD]13/07/18[/TD]
[TD]35000[/TD]
[/TR]
[TR]
[TD]Jason[/TD]
[TD]13/11/18[/TD]
[TD]26000[/TD]
[/TR]
</tbody>[/TABLE]
Now, I'd like to find the maximum commission earned by a person for a month subject to the condition that for each transaction max commission earned cannot exceed 25000
Now consider an Employee Alex. Let's say we want to calculate commission earned by him for the month of July.
As we can see the commission earned by him would be 10000 + 25000 = 35000
Now how do I derive the answer without adding any helper row / column using just a single formula.
As far as I know either the sumproduct or sum with array function can be used and using both I am able to derive a formula except that it does not consider the max commission limit. Somehow I cannot get my head around the MIN Function part.
Appreciate your help.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Alex[/TD]
[TD]01/07/18[/TD]
[TD]10000[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD]09/07/18[/TD]
[TD]20000[/TD]
[/TR]
[TR]
[TD]Alex[/TD]
[TD]13/07/18[/TD]
[TD]35000[/TD]
[/TR]
[TR]
[TD]Jason[/TD]
[TD]13/11/18[/TD]
[TD]26000[/TD]
[/TR]
</tbody>[/TABLE]
Now, I'd like to find the maximum commission earned by a person for a month subject to the condition that for each transaction max commission earned cannot exceed 25000
Now consider an Employee Alex. Let's say we want to calculate commission earned by him for the month of July.
As we can see the commission earned by him would be 10000 + 25000 = 35000
Now how do I derive the answer without adding any helper row / column using just a single formula.
As far as I know either the sumproduct or sum with array function can be used and using both I am able to derive a formula except that it does not consider the max commission limit. Somehow I cannot get my head around the MIN Function part.
Appreciate your help.