Vlookup If Na Then 0. If vlookup e1 a 2 b 10 2 0 sold out in stock you can also compare the value returned by vlookup with sample text. You can use the ifna function or iferror function to trap this error.
Then all n a errors will be replaced with 0. Vlookup to return blank or specific value instead of 0 or n a error value in excel. Iferror if len vlookup excel a1 b5 2 0 0 vlookup excel a1 b5 2 0 type this formula into a blank cell and press enter key in your keyboard.
Then write an if statement that compares vlookup s result with zero and returns no if it is equal to 0 yes otherwise.
If you want to return a specific text instead of the 0 value you can apply this formula. In this case be sure to enclose a text string in quotation marks like this. Then write an if statement that compares vlookup s result with zero and returns no if it is equal to 0 yes otherwise. When vlookup can t find a value in a lookup table it returns the n a error.