=IF(OR(D5<1,D5>2),"",(INDEX(B2:J2,MATCH(LOOKUP(D5,B1:J1,B2:J2),B2:J2,)+1)-LOOKUP(D5,B1:J1,B2:J2))*(D5-LOOKUP(D5,B1:J1))/(INDEX(B1:J1,MATCH(LOOKUP(D5,B1:J1,B2:J2),B2:J2,)+1)-LOOKUP(D5,B1:J1))+LOOKUP(D5,B1:J1,B2:J2))
生成结果:(更新了错误)
Function Commission(Sales)Const Pct1 = 0.55
Const Pct2 = 0.6
Const Pct3 = 0.65
Const Pct4 = 0.7
Const Pct5 = 0.75
Const Pct6 = 0.8
Const Pct7 = 0.85
Const Pct8 = 0.88
Const Pct9 = 0.9
Select Case Sales
Case 0 To 10000: Commission = Sales * Pct1
Case 10000.01 To 30000: Commission = Sales * Pct2
Case 30000.01 To 50000: Commission = Sales * Pct3
Case 50000.01 To 80000: Commission = Sales * Pct4
Case 80000.01 To 150000: Commission = Sales * Pct5
Case 150000.01 To 250000: Commission = Sales * Pct6
Case 250000.01 To 400000: Commission = Sales * Pct7
Case 400000.01 To 600000: Commission = Sales * Pct8
Case Is > 600000: Commission = Sales * Pct9
End Select
End Function
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)