Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Returning an alternative value if lookup cannot be found in array

I think I need to use an IF statement but I'm not sure how to do it ...

This is my current formula
=VLOOKUP(A6,Pricing!C1:D1871,2,0)

If this value, A6, cannot be found in the array I get the following returned
#N/A
If #N/A is returned I want Excel to put 0 (zero)

How do I do that please?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Returning an alternative value if lookup cannot be found in array

Look in the help index for
ISNA
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Queen_Of_Thebes" wrote in
message ...
I think I need to use an IF statement but I'm not sure how to do it ...

This is my current formula
=VLOOKUP(A6,Pricing!C1:D1871,2,0)

If this value, A6, cannot be found in the array I get the following
returned
#N/A
If #N/A is returned I want Excel to put 0 (zero)

How do I do that please?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Returning an alternative value if lookup cannot be found in array

Like this:

=IF(ISNA(VLOOKUP(A6,Pricing!C1:D1871,2,0)),0,VLOOK UP(A6,Pricing!
C1:D1871,2,0))

Hope this helps.

Pete

On Sep 1, 4:48*pm, Queen_Of_Thebes
wrote:
I think I need to use an IF statement but I'm not sure how to do it ...

This is my current formula
=VLOOKUP(A6,Pricing!C1:D1871,2,0)

If this value, A6, cannot be found in the array I get the following returned
#N/A
If #N/A is returned I want Excel to put 0 (zero)

How do I do that please?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Returning an alternative value if lookup cannot be found in ar

Many thanks, this has worked a treat :)

"Pete_UK" wrote:

Like this:

=IF(ISNA(VLOOKUP(A6,Pricing!C1:D1871,2,0)),0,VLOOK UP(A6,Pricing!
C1:D1871,2,0))

Hope this helps.

Pete

On Sep 1, 4:48 pm, Queen_Of_Thebes
wrote:
I think I need to use an IF statement but I'm not sure how to do it ...

This is my current formula
=VLOOKUP(A6,Pricing!C1:D1871,2,0)

If this value, A6, cannot be found in the array I get the following returned
#N/A
If #N/A is returned I want Excel to put 0 (zero)

How do I do that please?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Returning an alternative value if lookup cannot be found in ar

You're welcome - thanks for feeding back.

Pete

On Sep 1, 9:19*pm, Queen_Of_Thebes
wrote:
Many thanks, this has worked a treat :)

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
Alternative for Vlookup output of #N/A if data not found? mcmilja Excel Discussion (Misc queries) 4 May 8th 08 07:20 PM
Get Cell Address From Lookup (Alternative to Lookup) ryguy7272 Excel Worksheet Functions 12 September 28th 07 10:36 PM
VLOOK up returning #N/A even though value exists in lookup array [email protected] Excel Worksheet Functions 1 September 4th 07 06:56 PM
Case specific LOOKUP alternative dan Excel Discussion (Misc queries) 4 June 5th 06 12:22 PM
can lookup return err if no match found Kim Greenlaw Excel Worksheet Functions 12 January 12th 06 04:27 PM


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