如何根据Excel中的阈值计算佣金?

时间:2017-08-10 11:19:08

标签: excel excel-vba vba

我有一个如下所示的阈值限制,

    $('.groups-tooltip').tooltipster({            
        contentCloning: true,
        trigger: 'custom',
        interactive: true,
        contentAsHTML: true,
        triggerOpen: {
            mouseenter: true
        },
        triggerClose: {
            mouseleave: true
        },

        functionReady: function(instance, helper){   
            $(".tooltip-template-div").hide();
            $('.tooltip-template-span').on("click", function(){ 
                console.log("Clicked!");
            });  

            instance.content($('#tooltip-template').html());
        }      
    });

如果我的输入是40000,那么输出应该是(10000的20%)+(20000的25%)+(10000的35%)。

有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

假设您的数据布局如下所示

enter image description here

在单元格F1中,您可以放置​​要计算佣金的值。

在单元格G1中放置以下应计算佣金的公式:

=IF(F1<$A$1,0,IF(F1<$A$2,$D$1*F1,IF(F1<$A$3,$A$2*$D$1+(F1-$A$2)*$D$2,$A$2*$D$1+($A$3-$A$2)*$D$2+(F1-$A$3)*$D$3)))
相关问题