ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Trapping errors in a VLOOKUP function (https://www.excelbanter.com/excel-worksheet-functions/228938-trapping-errors-vlookup-function.html)

Blue Max

Trapping errors in a VLOOKUP function
 
The VLOOKUP( ) function results in an #N/A error if an exact match cannot be
found when the 'range_lookup' value is FALSE. In our case, this error
taints our whole formula. We would rather that the function return the
value zero (0) or FALSE indicating that NO matches were found, without
tainting the whole formula built around the lookup function.

We realize that we can trap the error using the ISERROR () function, but
this enlarges the size of our formula considerably since we already have to
test a rather long formula in order to trap the error. Is there a way to
modify the error value returned by a function for one of its arguments?


Ashish Mathur[_2_]

Trapping errors in a VLOOKUP function
 
Kinldy post an example and the formula you are using

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Blue Max" wrote in message
...
The VLOOKUP( ) function results in an #N/A error if an exact match cannot
be found when the 'range_lookup' value is FALSE. In our case, this error
taints our whole formula. We would rather that the function return the
value zero (0) or FALSE indicating that NO matches were found, without
tainting the whole formula built around the lookup function.

We realize that we can trap the error using the ISERROR () function, but
this enlarges the size of our formula considerably since we already have
to test a rather long formula in order to trap the error. Is there a way
to modify the error value returned by a function for one of its arguments?




All times are GMT +1. The time now is 09:53 AM.

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