Excel的运费计算器基于表

时间:2019-01-31 20:17:28

标签: excel

我正在尝试将下表转换为“计算器”,以便任何用户都可以输入信息(区域和重量)并获得运输费用。我有这样设置的表: Shipping Table

我使用下面的公式来尝试和拼凑此一并,但我收到错误为嵌套64层以上的层。

=IF(M2<2,5.99,IF(AND(M2<=3,T2<=6),5.99,IF(AND(M2<=3,T2=7),6,IF(AND(M2<=3,T2=8),6.29,IF(AND(M2<=4,T2<=5),5.99,IF(AND(M2<=4,T2=6),6.05,IF(AND(M2<=4,T2=7),6.44,IF(AND(M2<=4,T2=8),6.74,IF(AND(M2<=5,T2<=4),5.99,IF(AND(M2<=5,T2=5),6.15,IF(AND(M2<=5,T2=6),6.41,IF(AND(M2<=5,T2=7),6.74,IF(AND(M2<=5,T2=8),7.11,IF(AND(M2<=6,T2<=3),5.99,IF(AND(M2<=6,T2=4),6.01,IF(AND(M2<=6,T2=5),6.33,IF(AND(M2<=6,T2=6),6.56,IF(AND(M2<=6,T2=7),9.91,IF(AND(M2<=6,T2=8),7.25,IF(AND(M2<=7,T2<=3),5.99,IF(AND(M2<=7,T2=4),6.1,IF(AND(M2<=7,T2=5),6.52,IF(AND(M2<=7,T2=6),6.68,IF(AND(M2<=7,T2=7),7.09,IF(AND(M2<=7,T2=8),7.59,IF(AND(M2<=8,T2<=3),5.99,IF(AND(M2<=8,T2=4),6.26,IF(AND(M2<=8,T2=5),6.65,IF(AND(M2<=8,T2=6),6.88,IF(AND(M2<=8,T2=7),7.32,IF(AND(M2<=8,T2=8),7.85,IF(AND(M2<=9,T2<=3),5.99,IF(AND(M2<=9,T2=4),6.35,IF(AND(M2<=9,T2=5),6.7,IF(AND(M2<=9,T2=6),7.03,IF(AND(M2<=9,T2=7),7.61,IF(AND(M2<=9,T2=8),8.26,IF(AND(M2<=10,T2=2),7.16,IF(AND(M2<=10,T2=3),7.6,IF(AND(M2<=10,T2=4),8.42,IF(AND(M2<=10,T2=5),9.1,IF(AND(M2<=10,T2=6),9.47,IF(AND(M2<=10,T2=7),10.64,IF(AND(M2<=10,T2=8),11.64,IF(AND(M2<=11,T2=2),7.47,IF(AND(M2<=11,T2=3),7.77,IF(AND(M2<=11,T2=4),8.51,IF(AND(M2<=11,T2=5),9.15,IF(AND(M2<=11,T2=6),9.79,IF(AND(M2<=11,T2=7),11.52,IF(AND(M2<=11,T2=8),12.41,IF(AND(M2<=12,T2=2),7.59,IF(AND(M2<=12,T2=3),8.09,IF(AND(M2<=12,T2=4),8.59,IF(AND(M2<=12,T2=5),9.28,IF(AND(M2<=12,T2=6),10.14,IF(AND(M2<=12,T2=7),11.99,IF(AND(M2<=12,T2=8),12.99,IF(AND(M2<=13,T2=2),7.77,IF(AND(M2<=13,T2=3),8.1,IF(AND(M2<=13,T2=4),8.78,IF(AND(M2<=13,T2=5),9.54,IF(AND(M2<=13,T2=6),10.45,IF(AND(M2<=13,T2=7),12.84,IF(AND(M2<=13,T2=8),13.83

我不确定如何使用VLookup完成此操作,因为必须满足多个条件。任何帮助表示赞赏。

谢谢!

1 个答案:

答案 0 :(得分:1)

重量在M2中,区域在T2中。

=index(B4:H18, match(ceiling(M2, 1), A4:A18, 0), 1, match(T2, B3:H3, 0))

没有提供概念验证图像,因为没有在图像外部提供样本数据。