SOLVED

vlookup NA

%3CLINGO-SUB%20id%3D%22lingo-sub-2467571%22%20slang%3D%22en-US%22%3Evlookup%20NA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2467571%22%20slang%3D%22en-US%22%3E%3CP%3EAnyone%20have%20a%20good%20alternate%20for%20writing%20this%20sort%20of%20code%20to%20replace%20NA%20with%200%20all%20the%20time%20or%20else%20annoyed%20that%20they%20have%20to%20write%20this%20repeatedly%3F%26nbsp%3B%20%26nbsp%3BSort%20of%20surprised%20there%20isn't%20a%20function%20with%20another%20parameter%20allowed%20that%20would%20be%20the%20default%20replacement%20for%20an%20NA.%26nbsp%3B%20Yes%2C%20I%20could%20write%20my%20own%2C%20but%20I%20suppose%20I%20am%20really%20gauging%20if%20I%20am%20the%20only%20one%20who%20does%20this%20or%20if%20others%20have%20a%20similar%20need%20or%20if%20I%20have%20just%20fell%20into%20the%20groove%20of%20doing%20it%20this%20way%20and%20there%20is%20some%20other%2C%20newer%2C%20better%20function%20I%20should%20be%20using.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(ISNA(VLOOKUP(D2%2C%24A%242%3A%24B%2438%2C2%2CFALSE))%2C0%2CVLOOKUP(D2%2C%24A%242%3A%24B%2438%2C2%2CFALSE))%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2467571%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2467594%22%20slang%3D%22en-US%22%3ERe%3A%20vlookup%20NA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2467594%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1084602%22%20target%3D%22_blank%22%3E%40hurleygj%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20name%20of%20such%20function%20is%20XLOOKUP()%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2508409%22%20slang%3D%22en-US%22%3ERe%3A%20vlookup%20NA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2508409%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETHANK%20YOU!!!!!!%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Anyone have a good alternate for writing this sort of code to replace NA with 0 all the time or else annoyed that they have to write this repeatedly?   Sort of surprised there isn't a function with another parameter allowed that would be the default replacement for an NA.  Yes, I could write my own, but I suppose I am really gauging if I am the only one who does this or if others have a similar need or if I have just fell into the groove of doing it this way and there is some other, newer, better function I should be using.

 

=IF(ISNA(VLOOKUP(D2,$A$2:$B$38,2,FALSE)),0,VLOOKUP(D2,$A$2:$B$38,2,FALSE))

2 Replies
best response confirmed by allyreckerman (Microsoft)
Solution

@hurleygj 

The name of such function is XLOOKUP()

@Sergei Baklan 

 

THANK YOU!!!!!!