ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Vlookup function error (https://www.excelbanter.com/excel-programming/352011-re-vlookup-function-error.html)

Dave Peterson

Vlookup function error
 
=if(iserror(vlookup(A1,A2:B10,2,false)),"",vlookup (A1,A2:B10,2,false))



wrote:

Hello:
Would appreciate help with this one.

I am using a VLOOKUP function as follows:

Cell C1 contains the formula =VLOOKUP(A1,A2:B10,2,false)

Users enter a text value in Cell A1, I use the Vlookup function to look
up the text value in A1 against values in range A2:B10 & return the
corresponding value from the second column in the range.

This works well except then the user enters a text value in cell A1
which is not listed in range A2:A10. The vlookup function then returns
an error value = #N/A

Is there any way to suppress this error message by using a different
formula, or is there a different way of avoiding the error message

TIA

Vinay


--

Dave Peterson


All times are GMT +1. The time now is 02:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com