I am trying to populate rows of data from another sheet using VLOOKUP
and ARRAYFORMULA
.
Here is the data where I am using 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.