Search code examples
excelexcel-formulaexcel-match

Two column lookup in table array using INDEX and MATCH


I would like excel to display the value from table array which has two matching cells com_cd and div_cd using INDEX and MATCH.

I have tried the following formula but it did not work.

=INDEX(K9:K53,MATCH(K3,I9:I53,0),MATCH(K4,J9:J53,0)) 

Here is a screenshot of the excel sheet with the desired result given according to com_cd and div_cd

div


Solution

  • Try an array formula (CTRL + SHIFT + ENTER) instead of Enter.

    =INDEX(K9:K53,MATCH(K3&K4,I9:I53&J9:J53,0),1)
    

    Not tested but should work.

    Will edit later explaining our formula and reason why your formula doesn't work.