So I am working on what seemed to be a simple project. I have the following matrix:
$0 $40,000,000 0.200%
$40,000,001 $80,000,000 0.175%
$80,000,001+ 0.125%
If I have a value of $50,000,000 then the function must perform the following calculation:
($40,000,000 * .2%) + (($50,000,000 - $40,000,001) * .175%)
The UDF must be dynamic so that it can work on any number of rows, and the columns will always be (LBound, UBound, %Rate), so no more than 3 columns.
I was able to do this with INDEX and the SUMPRODUCT function but if I add rows then I would have to change the formula and since this is going to someone who is not excel savvy that is not a workable solution.
$0 $40,000,000 0.200%
$40,000,001 $80,000,000 0.175%
$80,000,001+ 0.125%
If I have a value of $50,000,000 then the function must perform the following calculation:
($40,000,000 * .2%) + (($50,000,000 - $40,000,001) * .175%)
The UDF must be dynamic so that it can work on any number of rows, and the columns will always be (LBound, UBound, %Rate), so no more than 3 columns.
I was able to do this with INDEX and the SUMPRODUCT function but if I add rows then I would have to change the formula and since this is going to someone who is not excel savvy that is not a workable solution.