我现在需要在单价一列中根据长度和机号,满足不同的条件,在单价列返回相应的数值。
在j2单元格输入
=IF(H2<80,VLOOKUP(G2,B$2:C$10,2,0),IF(H2<150,IF(ISERROR(VLOOKUP(G2,B$2:D$10,3,0)),VLOOKUP(G2,B$12:C$100,2,0),VLOOKUP(G2,B$2:D$10,3,0)),VLOOKUP(G2,B$12:D$100,3,0)))
下拉追问
=IF(H2<80,VLOOKUP(G2,B$2:C$10,2,0),IF(H2<150,IF(ISERROR(VLOOKUP(G2,B$2:D$10,3,0)),VLOOKUP(G2,B$12:C$100,2,0),VLOOKUP(G2,B$2:D$10,3,0)),VLOOKUP(G2,B$12:D$100,3,0)))
下拉追问
J8 和J16 数据不对,麻烦再看看咯
追答=IF(H2<80,IF(ISERROR(VLOOKUP(G2,B$2:C$10,2,0)),VLOOKUP(G2,$B$12:$E$100,2,),VLOOKUP(G2,B$2:C$10,2,0)),IF(H2<150,IF(ISERROR(VLOOKUP(G2,B$2:D$10,3,0)),VLOOKUP(G2,B$12:C$100,2,0),VLOOKUP(G2,B$2:D$10,3,0)),VLOOKUP(G2,B$12:D$100,3,0)))
温馨提示:答案为网友推荐,仅供参考