求excel函数公式!!
来源:百度知道 编辑:UC知道 时间:2024/08/28 07:11:43
如果A1单元格是"桶装", 则B1显示"0.0189"
如果A1单元格是"塑包", 则B1显示"0.0066"
如果A1单元格是"普包", 则B1显示"0.0132"
如果A1单元格是"380气", 则B1显示"0.00912"
如果A1单元格是"5L气", 则B1显示"0.02"
如果A1单元格是"1.5C气", 则B1显示"0.018"
如果A1单元格是"1.5C果园", 则B1显示"0.0094"
如果A1单元格是"6C果园", 则B1显示"0.0074"
如果A1单元格是"5C果园", 则B1显示"0.0062"
如果A1单元格是"健美包", 则B1显示"0.0125"
如果A1单元格是"C1果汁", 则B1显示"0.0055"
如果A1单元格是"激情", 则B1显示"0.068"
这样要怎样设置公式??
如果A1单元格是"塑包", 则B1显示"0.0066"
如果A1单元格是"普包", 则B1显示"0.0132"
如果A1单元格是"380气", 则B1显示"0.00912"
如果A1单元格是"5L气", 则B1显示"0.02"
如果A1单元格是"1.5C气", 则B1显示"0.018"
如果A1单元格是"1.5C果园", 则B1显示"0.0094"
如果A1单元格是"6C果园", 则B1显示"0.0074"
如果A1单元格是"5C果园", 则B1显示"0.0062"
如果A1单元格是"健美包", 则B1显示"0.0125"
如果A1单元格是"C1果汁", 则B1显示"0.0055"
如果A1单元格是"激情", 则B1显示"0.068"
这样要怎样设置公式??
=CHOOSE(MATCH(A1,{"桶装","塑包","普包","380气","5L气","1.5C气","1.5C果园","6C果园","5C果园","健美包","C1果汁","激情"},0),0.0189,0.0066,0.0132,0.00912,0.02,0.018,0.0094,0.0074,0.0062,0.0125,0.0055,0.068)
使用VLOOKUP公式
首先把这个对照做一个具固定的表格。然后编辑公式
可以用IF函数,不过比较麻烦,如果要的话,可以帮你写个
=Vookup(A1,{桶装,0.0189;塑包,0.0066;普包,0.0132;380气,0.00912;5L气,0.02;1.5C气,0.018;1.5C果园,0.0094;6C果园,0.0074;5C果园,0.0062;健美包,0.0125;C1果汁,0.0055;激情,0.068},2,0)