Converting a Vlookup to Index/Match within an IF and IFERROR function
I'm currently using this formula
=IFERROR(IF(DSP@row = "", VLOOKUP(Code@row, {ClientNo}, 7, false), VLOOKUP(DSP@row, {ClientNo}, 5, false)), "")
and it works great. However, I need to delete some columns on my reference sheet that are within the vlookup table. I want to convert the above formula to INDEX MATCH so I don't have to worry about this anymore but I'm just get a blank cell as a result. This is what I'm trying:
=IFERROR(IF(DSP@row = "", INDEX({Client#}, MATCH(Code@row, {Code}, 0)), INDEX(MATCH(DSP@row, {DSP}, 0))), "")
What am I missing?
Best Answer
-
Hi @Jennifer Lenander ,
You're missing the Index range in the 2nd half of your formula.
=IFERROR(IF(DSP@row = "", INDEX({Client#}, MATCH(Code@row, {Code}, 0)), INDEX({MISSING RANGE}, MATCH(DSP@row, {DSP}, 0))), "")
Mark
I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.
Answers
-
Hi @Jennifer Lenander ,
You're missing the Index range in the 2nd half of your formula.
=IFERROR(IF(DSP@row = "", INDEX({Client#}, MATCH(Code@row, {Code}, 0)), INDEX({MISSING RANGE}, MATCH(DSP@row, {DSP}, 0))), "")
Mark
I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.
-
@Mark Cronk - I feel like such an idiot. I worked on this for longer than I would like to admit and stared at it trying to figure out what was wrong.... Thank you for pointing out my error!
-
Happy to help. Thank you for using the Community.
Mark
I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.
Help Article Resources
Categories
Check out the Formula Handbook template!