我制作了一份电子表格,根据雇主对员工和受抚养人的贡献百分比来计算保险费率。除了100%雇主对员工的贡献和> 0.1%之外,整个公式的运作完美,这是下面公式的最后一部分。我试图涵盖所有可能的组合:
Employer Contribution
Employee Dependent
0% 0%
100% 0%
100% 100%
1%-99% 0%
1%-99% 1-99%
100% 1-99% - This combination produces a "FALSE" in the formula below
以下是电子表格的布局方式:
Employer Contribution
Employee:100% (Cell A1) Dependent:0% (Cell A2)- Enter any percentage for each
Below are hard keyed numbers
(Cell A4) (Cell B4) (Cell C4)(Cell D4)(Cell E4)
Name Employee Spouse Children Total Name Employer Employee Total
Johnson $200 $200 $100 $500 Johnson POPULATED BASED ON THE FORMULA
这是公式:
=IF(AND(A1=0%,A2=0%),0,
IF(AND(A1=100%,A2=0%),B4,
IF(AND(A1=100%,A2=100%),E4,
IF(AND(A1>1%,A1<=99%,A2=0%),A1*B4,
IF(AND(A1>1%,A1<=99%,A2>1%,A2<=99%),(SUM(C4:D4)*A2)+(A1*B4,
IF(AND(A1=100%,A2>1%,A2<=99%),(SUM(C4:D4)*A2)+(A1*B4))))))))
我希望解决为什么最后一个组合不起作用。谢谢你的帮助!
答案 0 :(得分:0)
您需要查看和修复的内容很少。
A1*A4
),因为A4单元格具有文本值,即约翰逊您需要解决这些问题。这是我的建议,我写了A1*B4
最后一个条件:
=IF(AND(A1=0%,A2=0%),0,
IF(AND(A1=100%,A2=0%),B4,
IF(AND(A1=100%,A2=100%),E4,
IF(AND(A1>=1%,A1<=99%,A2=0%),"CASE 4",
IF(AND(A1>=1%,A1<=99%,A2>=1%,A2<=99%),(SUM(C4:D4)*A2)+(B4*A1),
IF(AND(A1=100%,A2>=1%,A2<=99%),(SUM(C4:D4)*A2)+(A1*B4),"UNDEFINED CASE!"))))))
编辑 - 我不确定您是如何应用它的。发布文件的链接。 See Here.