发布网友 发布时间:2024-10-04 23:32
共2个回答
热心网友 时间:2024-10-05 02:40
编程就不怎么会,用公式试着帮你解决一下。A1中为区域(1-4的数字),B1中为重量,如果是不分段计费,你可以在C1中输入=CHOOSE(A1,IF(B1<=1,10,IF(B1<=10,(B1-1)*2+10,IF(B1<=60,(B1-1)*2+10,(B1-1)*1+10))),IF(B1<=1,12,IF(B1<=10,(B1-1)*2+12,IF(B1<=60,(B1-1)*1.5+12,(B1-1)*1+12))),IF(B1<=1,15,IF(B1<=10,(B1-1)*2.5+15,IF(B1<=60,(B1-1)*3+15,(B1-1)*2+15))),IF(B1<=1,20,IF(B1<=10,(B1-1)*3+20,IF(B1<=60,(B1-1)*4+20,(B1-1)*2.5+20)))),如果采用分段计费方式,你可以输入公式:=CHOOSE(A2,IF(B2<=1,10,IF(B2<=10,(B2-1)*2+10,IF(B2<=60,(B2-10)*2+28,(B2-60)*1+128))),IF(B2<=1,12,IF(B2<=10,(B2-1)*2+12,IF(B2<=60,(B2-10)*1.5+30,(B2-60)*1+105))),IF(B2<=1,15,IF(B2<=10,(B2-1)*2.5+15,IF(B2<=60,(B2-10)*3+37.5,(B2-60)*2+187.5))),IF(B2<=1,20,IF(B2<=10,(B2-1)*3+20,IF(B2<=60,(B2-10)*4+47,(B2-60)*2.5+247)))),热心网友 时间:2024-10-05 02:40
假设你的条件分设在A:D四列,再假设H3是区域,I3是重量,那么可以根据你给的条件做如下的IF函数嵌套实现你的价格计算,虽然公式看上去不舒服,但是基本逻辑是简单的,就是根据条件来判断!