# searching two criteria to return a value

Copper Contributor

# searching two criteria to return a value

Hi,

I need help to write a formula, as the function I would usually use doesn't work and I'm unsure on other functions.

I have two worksheets and I need to pull information from  worksheet 1 to worksheet 2  using a formula, as there are over 5k rows to work through. I'd usually use a v-lookup to this but this only checks criteria against one column so I'm returning the same barcode for different variant codes. I need the formula to search column A & column B and return a value in C

Sheet 1

Sheet two

 Product Size EAN 041003ZALPP 5-6 041003ZALPP 7-8 041003ZALPP 9-10 041004ZALPP 5-6 041004ZALPP 5-6 041004ZALPP 7-8 041004ZALPP 7-8 041004ZALPP 9-10 041007ZALPP 5-6 041007ZALPP 7-8 041007ZALPP 9-10
2 Replies

# Re: searching two criteria to return a value

=VLOOKUP(E3&F3,CHOOSE({1,2},\$A\$3:\$A\$13&\$B\$3:\$B\$13,\$C\$3:\$C\$13),2,FALSE)

You can apply VLOOKUP along with CHOOSE. Enter the formula with ctrl+shift+enter if you don't work with Office 365 or Excel for the web or Excel 2021.

# Re: searching two criteria to return a value

@OliverScheurich Thank you! this worked a treat :)