KnightShadeX
KnightShadeX

Reputation: 108

ARRAYFORMULA(VLOOKUP()) returning first lookup for all results

I'm trying to use the following formula:

=ARRAYFORMULA(VLOOKUP( $E2 & $G2, { ARRAYFORMULA (SKUs!$A2:$A & SKUs!$B2:$B ), SKUs!$D2:$D }, 2*SIGN(ROW($E2:$E)), FALSE))

to retrieve SKUs from a separate sheet in the same document. However, my column is only returning the first value over and over again to fill the column.

Current sheet:

   E              G             H (contains formula)
chicken        sandwich        456
duck           sandwich        456
turkey         whole           456

SKUs:

   A              B             D
chicken        sandwich        456
duck           sandwich        789
turkey         whole           123

I've tried changing nearly every individual piece of the formula that made sense, but it continues to just return the SKU of the first item when it looks it up. I did verify, however, that it is properly VLOOKUPing the first item. (that's not the first item in the SKUs list).

Anyone have any idea what I'm doing wrong here?

I posted this issue on Google Docs Help Forum as well

Upvotes: 1

Views: 2939

Answers (1)

TheMaster
TheMaster

Reputation: 50445

=ARRAYFORMULA(VLOOKUP(E2:E4&G2:G4,{SKUs!A:A&SKUs!B:B,SKUs!D:D},2,0))    

You were getting 3 same values because you were only looking up E2&G2.

Upvotes: 2

Related Questions