Forum Discussion

NATCTL's avatar
NATCTL
Copper Contributor
Dec 14, 2023

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

ProductSizeEAN
041003ZALPP5-6 
041003ZALPP7-8 
041003ZALPP9-10 
041004ZALPP5-6 
041004ZALPP5-6 
041004ZALPP7-8 
041004ZALPP7-8 
041004ZALPP9-10 
041007ZALPP5-6 
041007ZALPP7-8 
041007ZALPP9-10 

2 Replies

  • NATCTL 

    =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.

Resources