简体   繁体   中英

match a range on query function in google sheets

I am trying to create an arrayformula that matches the column from a certain sheet to the current sheet. I have a list of names (Column B) in sheet1 with its value (Column C), and in sheet2 i have all the names in a different order, and i want to bring their respective values to the current sheet, i have tried the following formula but it only matches the first value which is A2 and not the rest to the A14

=ARRAYFORMULA({"Match";IF(ISBLANK(A2:A14),"",IFERROR(QUERY(Sheet1!$B$2:$C$14, "select C where B matches '"&A2:A&"' "),0))})

Any help will be very much appreciated.

Link to the sheet

use:

=INDEX(IFNA(VLOOKUP(A2:A, Sheet1!B:C, 2, )))

在此处输入图像描述

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