简体   繁体   中英

Google Sheets VLOOKUP using arrayformula not working

I am trying to populate rows of data from another sheet using VLOOKUP and ARRAYFORMULA .

Here is the data where I am using arrayformula :

具有arrayformula的单元格

G2 has the formula:

=arrayformula(if(ISBLANK(E2:E),"",VLOOKUP(E2:E,'Product List'!$A$2:$C,2)*F2:F))

And here is the "Product List" from the other sheet:

产品列表

As you can see, it is bringing in the wrong numbers:

在此处输入图片说明

What is wrong with my arrayformula that is making it do this?

If the content in column E is not an exact match to something in column A, it will pull the closest match. If you don't want this, you can fix this by adding FALSE as the fourth parameter in VLOOKUP . By adding FALSE as shown below, cells that are not a match will show as #N/A instead of an incorrect number.

=ARRAYFORMULA(IF(ISBLANK(E2:E),"",VLOOKUP(E2:E,'Product List'!$A$2:$C,2,FALSE)*F2:F))

Other than that, I don't see why the formula wouldn't work.

只需对上述答案做些微修改,以解决可能的错误并渲染出不必要的语法元素,以使其更短

=ARRAYFORMULA(IF(E2:E="", , IFERROR(VLOOKUP(E2:E,'Product List'!A2:C, 2, 0))*F2:F))

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