SOLVED

vlookup NA

Copper 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!!!!!!

1 best response

Accepted Solutions
best response confirmed by allyreckerman (Microsoft)
Solution

@hurleygj 

The name of such function is XLOOKUP()

View solution in original post