Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Stop using vlookup. Use index and match, either through named references as Joel does it or just manually even. It's more powerful, faster and less prone to failure because vlookup relies on an assumed order of sorting but most people won't know this and will wonder why it's cocking up.


You really should use MATCH with last argument 0 (exact match) and use it only within IF(ISERROR:

IF(ISERROR(MATCH(Key;Keys;0));"null";INDEX(Values, MATCH(Key; Keys))))


Fourth argument, set to false.

Fixes the ordering issue.


VLOOKUP has a parameter for exact matches.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: