简体   繁体   中英

QUERY data based on multi criteria

Here's an example:

Sheet1:

4

Sheet2:

2

How do I match the price from Sheet 2 to Sheet 1 based on 3 criteria: Customer Name and Quantity under items? I need to return the Price on Sheet 1 and if cell states 0, return 'No order'.

Here's a link to a testing sheet.

I've tried QUERY formula but it does not work. Thank you so much!

=IFERROR(IF(LEN($A$2:$A), 
 TEXT(QUERY(QUERY('Helper Column'!$A$2:$D, 
 "Select *", 0), 
 "Select Col4 where Col1='"&$A2&"' and Col3='"&$B$1&"'", 0),
 "$###.00"), ), "No order")

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM