Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Return 0 when if statement with VLOOKUP returns#N/A

I am using a formula to return #N/A when a value cannot be found on a lookup
or the actual value if found. I keep getting the message I have a formula
error which then highlights "0" as the error in the formula. Formula being
used is;
=IF(ISNA(VLOOKUP(A15,'Talla#2'!A1:G1266,5,false),0 ,VLOOKUP(A15,'Talla#2'!A4:G1280,5,false), or if I use ,"", to return blank I get the same error message.
Can anyone see where I might be going wrong. Using Excel 2003.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default Return 0 when if statement with VLOOKUP returns#N/A

Try
=IF(ISNA(VLOOKUP(A15,'Talla#2'!A1:G1266,5,FALSE)), "Not
Found",VLOOKUP(A15,'Talla#2'!A4:G1280,5,FALSE))

when you get it working you can replace "Not Found" with 0 or ""

You were missing couple of ) in your formula...
One each after both FALSE)

"stoz" wrote:

I am using a formula to return #N/A when a value cannot be found on a lookup
or the actual value if found. I keep getting the message I have a formula
error which then highlights "0" as the error in the formula. Formula being
used is;
=IF(ISNA(VLOOKUP(A15,'Talla#2'!A1:G1266,5,false),0 ,VLOOKUP(A15,'Talla#2'!A4:G1280,5,false), or if I use ,"", to return blank I get the same error message.
Can anyone see where I might be going wrong. Using Excel 2003.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 857
Default Return 0 when if statement with VLOOKUP returns#N/A

Hi,

If you are using 2007 you can simplify this to

=IFERROR(VLOOKUP(A15,'Talla#2'!A1:G1266,5,),0)

This is not only shorter, but is is computer efficient, because VLOOKUP is a
resource intensive function and using the old way meant that if there was no
error Excel calculated the lookup twice!

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"stoz" wrote:

I am using a formula to return #N/A when a value cannot be found on a lookup
or the actual value if found. I keep getting the message I have a formula
error which then highlights "0" as the error in the formula. Formula being
used is;
=IF(ISNA(VLOOKUP(A15,'Talla#2'!A1:G1266,5,false),0 ,VLOOKUP(A15,'Talla#2'!A4:G1280,5,false), or if I use ,"", to return blank I get the same error message.
Can anyone see where I might be going wrong. Using Excel 2003.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Return 0 when if statement with VLOOKUP returns#N/A

Why do you have 2 different ranges:

VLOOKUP(A15,'Talla#2'!A1:G1266,5,false)
VLOOKUP(A15,'Talla#2'!A4:G1280,5,false)

Here's another one using the same range on both ends:

=IF(COUNTIF('Talla#2'!A1:A1266,A15),VLOOKUP(A15,'T alla#2'!A1:G1266,5,0),0)

--
Biff
Microsoft Excel MVP


"stoz" wrote in message
...
I am using a formula to return #N/A when a value cannot be found on a
lookup
or the actual value if found. I keep getting the message I have a formula
error which then highlights "0" as the error in the formula. Formula being
used is;
=IF(ISNA(VLOOKUP(A15,'Talla#2'!A1:G1266,5,false),0 ,VLOOKUP(A15,'Talla#2'!A4:G1280,5,false),
or if I use ,"", to return blank I get the same error message.
Can anyone see where I might be going wrong. Using Excel 2003.



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
If statement returns zeros Rich D Excel Discussion (Misc queries) 5 December 15th 07 07:28 PM
Vlookup to return results of If statement ruthhicks999 Excel Worksheet Functions 0 February 27th 07 11:25 AM
Excel If statement that is supposed to return a "" instead returns a 0 omalleyman Excel Worksheet Functions 1 October 5th 06 09:18 PM
Excel 2000 VLOOKUP returns #N/A unless press F2 return on source? Colin Excel Worksheet Functions 3 August 31st 05 01:10 PM
Vlookup of an if statement return James Excel Worksheet Functions 2 April 6th 05 10:28 PM


All times are GMT +1. The time now is 11:21 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"