#1   Report Post  
mick.smith1964
 
Posts: n/a
Default Vlookup Error

Hi

I have alot of Vlookup functions in a worksheet. Some return values, others
do not which results in #N/A in the cell.

Is there a way to avoid #N/A being returned. All I want is either a positive
value or an empty cell.

Thanks for any suggestions


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Hi Mick,

One way

=IF(ISNA(lookup_formula),"",lookup_formula)

this traps #N/A errors specifically, a more generic solution is

=IF(ISERROR(lookup_formula),"",lookup_formula)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"mick.smith1964" wrote in message
...
Hi

I have alot of Vlookup functions in a worksheet. Some return values,

others
do not which results in #N/A in the cell.

Is there a way to avoid #N/A being returned. All I want is either a

positive
value or an empty cell.

Thanks for any suggestions




  #3   Report Post  
BCGROUPNY
 
Posts: n/a
Default

Try using the isna() function, @if(Isna(vlookup.....),"",(vlookup.....))

"mick.smith1964" wrote:

Hi

I have alot of Vlookup functions in a worksheet. Some return values, others
do not which results in #N/A in the cell.

Is there a way to avoid #N/A being returned. All I want is either a positive
value or an empty cell.

Thanks for any suggestions



  #4   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

See for a set of alternative approaches:

http://www.mrexcel.com/board2/viewtopic.php?t=62102

BTW, also investigate whether you can sort the lookup table(s) you use
for that would allow you to do faster lookups (with added bonus no #N/A's).

mick.smith1964 wrote:
Hi

I have alot of Vlookup functions in a worksheet. Some return values, others
do not which results in #N/A in the cell.

Is there a way to avoid #N/A being returned. All I want is either a positive
value or an empty cell.

Thanks for any suggestions


  #5   Report Post  
Mick
 
Posts: n/a
Default

Works great. Thanks very much for the suggestion.

"BCGROUPNY" wrote in message
...
Try using the isna() function, @if(Isna(vlookup.....),"",(vlookup.....))

"mick.smith1964" wrote:

Hi

I have alot of Vlookup functions in a worksheet. Some return values,
others
do not which results in #N/A in the cell.

Is there a way to avoid #N/A being returned. All I want is either a
positive
value or an empty cell.

Thanks for any suggestions







  #6   Report Post  
Ola
 
Posts: n/a
Default

Hi,

Try this: =LOOKUPV(C1,A1:B100,2,0,"")


But first
1. Press Alt+F11. Insert Module. Copy and Paste the below.

Function LookupV(Lookup_Value, Table_Array As Range, Col_Index_Num,
Range_value, Optional Error_Msg)
LookupV = Application.VLookup(Lookup_Value, Table_Array, Col_Index_Num,
Range_value)
If IsError(LookupV) And Not IsMissing(Error_Msg) Then LookupV =
Error_Msg
End Function

The LOOKUPV formula is Shorter and is Faster then VLOOKUP
Make sure the VBA code is only 4 rows!

Regards,
Ola

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup & Lookup function error Beginner Excel Worksheet Functions 9 January 11th 05 12:37 AM
vlookup error Josh O. Excel Worksheet Functions 6 December 30th 04 05:16 PM
Vlookup Syntax Error YV New Users to Excel 9 December 23rd 04 05:28 PM
Vlookup #N/A error due to formatting Patrick_KC Excel Worksheet Functions 4 December 21st 04 07:39 PM
#N/A error with VLOOKUP Michelle Tucker Excel Discussion (Misc queries) 4 December 14th 04 01:23 PM


All times are GMT +1. The time now is 03:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"