Forum Discussion

BYahr1512's avatar
BYahr1512
Copper Contributor
Feb 10, 2019

Look up values in 3 successive columns and return the value in final row from 4th column.

I have data in columns that I need to look up a value in the first column, then the second, then the third and return the value found in the final row and a fourth column.

Example:  Within the rows that column A=14, and column B="RB1", and column C=1, return the value in column D.

 

12 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    That could be

    =LOOKUP(PI(),1/((A1:A200=14)*(B1:B200="RB1")*(C1:C200=1)),D1:D200)
      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        It returns #N/A if you have no such combination. For such cases you may wrap formula like

        =IFNA(LOOKUP(PI(),1/((A1:A200=14)*(B1:B200="RB1")*(C1:C200=1)),D1:D200),"no such")

        In general it works, please check attached file.

         

        Possible reasons why doesn't match - you compare text "1" and number 1; etc.

      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        Detlef_Lewin , I was going to use 2 as usual, but recall your discussion here long ago about the PI(). Just more sexy...

Resources