Google Sheet有条件查找范围

时间:2019-01-14 05:26:55

标签: google-sheets google-sheets-formula

我有两张纸 具有列的SheetA

Courier | From | To    | Weight (kg) | Price  
DHL     |  US  | China | 8           | (Derived from SheetB) 
DHL     |  US  | China | 15          | (Derived from SheetB)

带有列的SheetB

Courier | From | To    | Min  | Max        |Price  
DHL     |  US  | China | 0.01 | 5          | 10  
DHL     |  US  | China | 5.01 | 10         | 20  
DHL     |  US  | China | 10.01| (infinity) | 50

如何获取具有查询功能的SheetA以返回“价格”?

结果:

Courier | From         | To         | Weight (kg) | Price
DHL     |  US          | China      | 8           | 20
DHL     |  US          | China      | 15          | 50

感谢您的帮助

1 个答案:

答案 0 :(得分:0)

=ARRAYFORMULA(IFERROR(VLOOKUP(D2:D, SheetB!D2:F, 3, 1), ))