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
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 422 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!