Forum Discussion
BYahr1512
Feb 10, 2019Copper Contributor
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
- SergeiBaklanDiamond Contributor
That could be
=LOOKUP(PI(),1/((A1:A200=14)*(B1:B200="RB1")*(C1:C200=1)),D1:D200)
- BYahr1512Copper Contributor
The result returned is #N/A.
- SergeiBaklanDiamond 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.
- Detlef_LewinSilver Contributor
SergeiBaklan Pi rocks!
- SergeiBaklanDiamond Contributor
Detlef_Lewin , I was going to use 2 as usual, but recall your discussion here long ago about the PI(). Just more sexy...