Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
systemx
 
Posts: n/a
Default Get rid of #N/A when using lookup


Hi all,

I am using the following lookup statement -

=VLOOKUP($B11,Distribution!$B$12:$B$150,1,FALSE)

If the value does not exist, excel returns #N/A, which is to be
expected. However, I would like it to return a different value if the
VLOOKUP value does not exist.

ie. instead of #N/A I would like it to return a text string of my
choice.

I have tried to use an IF statement...eg

=IF((VLOOKUP($B11,Distribution!$B$12:$B$150,1,FALS E)=B11, B11, "Text
string")

However, this still returns an N/A when the value does not exist.

Can anyone suggest a way around this? I get the feeling I may be
missing something very simple :P


Cheers

Rob


--
systemx
------------------------------------------------------------------------
systemx's Profile: http://www.excelforum.com/member.php...o&userid=29254
View this thread: http://www.excelforum.com/showthread...hreadid=523442

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
systemx
 
Posts: n/a
Default Get rid of #N/A when using lookup


Have managed to figure this one out myself with -

=IF(ISERROR(VLOOKUP($B2,Distribution!$B$12:$B$150, 1,FALSE)),"MY TEXT
STRING",(VLOOKUP($B2,Distribution!$B$12:$B$150,1,F ALSE)))

Cheers

Rob :)


--
systemx
------------------------------------------------------------------------
systemx's Profile: http://www.excelforum.com/member.php...o&userid=29254
View this thread: http://www.excelforum.com/showthread...hreadid=523442

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Get rid of #N/A when using lookup

"systemx" wrote:
=IF(ISERROR(VLOOKUP($B2,Distribution!$B$12:$B$150, 1,FALSE)),
"MY TEXT STRING",(VLOOKUP($B2,Distribution!$B$12:$B$150,1,F ALSE)))


Perhaps this shorter version using MATCH would also suffice:
=IF(ISNA(MATCH($B2,Distribution!$B$12:$B$150,0))," MY TEXT
STRING",$B2)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


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
Another way to lookup data David Vollmer Excel Worksheet Functions 1 September 23rd 05 05:16 AM
Lookup Vector > Lookup Value Alec Kolundzic Excel Worksheet Functions 6 June 10th 05 02:14 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Lookup function w/Text and Year Josh O. Excel Worksheet Functions 1 February 12th 05 11:27 PM
double lookup, nest, or macro? Josef.angel Excel Worksheet Functions 1 October 29th 04 09:50 AM


All times are GMT +1. The time now is 04:11 PM.

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

About Us

"It's about Microsoft Excel"