Forum Discussion
Lookup iferror, index/match errors
Using the IFEEROR, INDEX and MATCH Formula
We want to get a product description in the cell F3, from the lookup table H3:I9, based on the Product ID 103 in the cell C3. If Product ID 103 is not found in the lookup table, we want to return “Description missing” in F3.
The formula looks like:
=IFERROR(INDEX($H$3:$I$9, MATCH(C3, $H$3:$H$9, 0), 2), “Description missing”)
The lookup_value parameter of the MATCH function is C3. The lookup_array is $H$3:$H$9, while the match_type is 0, as we want the exact match. The result of the MATCH function is the row_num parameter of the INDEX function. The array the range $H$3:$I$9. Finally, the value parameter of the IFERROR function is the result of the INDEX function, while the value_if_error is “Description missing”.
To apply the formula, we need to follow these steps:
Select cell F3 and click on it
Insert the formula: =IFERROR(INDEX($H$3:$I$9, MATCH(C3, $H$3:$H$9, 0), 2), "Description missing")
Press enter
Drag the formula down to the other cells in the column by clicking and dragging the little “+” icon at the bottom-right of the cell.
For this concrete example I'd recommend
=IFERROR(INDEX($I$3:$I$9, MATCH(C3, $H$3:$H$9, 0)), “Description missing”)
Why to replicate the weakness of VLOOKUP()?