#1   Report Post  
Jimat56
 
Posts: n/a
Default vlookup

I need a way of testing the return value from a vlookup call.
It will happen that the lookup will fail and the return will be #N/A, which
is not nicest thing to see on a spreadsheet! I have tried "if" statement
variations but testing the cell is unsuccessful as the 'value'of the cell is
not what is displayed!

Jim Crawford
Alden Press
Oxford UK



  #2   Report Post  
RagDyer
 
Posts: n/a
Default

To return an empty cell if a match is not found:

=IF(ISNA(MATCH(D1,A1:A100,0)),"",VLOOKUP(D1,A1:C10 0,3,0))
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================



"Jimat56" wrote in message
...
I need a way of testing the return value from a vlookup call.
It will happen that the lookup will fail and the return will be #N/A,

which
is not nicest thing to see on a spreadsheet! I have tried "if" statement
variations but testing the cell is unsuccessful as the 'value'of the cell

is
not what is displayed!

Jim Crawford
Alden Press
Oxford UK




  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Assume you VLOOKUP would look like this

=VLOOKUP(A2,B2:D400,2,FALSE)

=IF(ISNUMBER(MATCH(A2,B2:B400,0)),VLOOKUP(A2,B2:D4 00,2,FALSE),"")

that is the best way to error check it, will return a blank cell if value
not found


Regards,

Peo Sjoblom

"Jimat56" wrote:

I need a way of testing the return value from a vlookup call.
It will happen that the lookup will fail and the return will be #N/A, which
is not nicest thing to see on a spreadsheet! I have tried "if" statement
variations but testing the cell is unsuccessful as the 'value'of the cell is
not what is displayed!

Jim Crawford
Alden Press
Oxford UK




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
Have Vlookup return a Value of 0 instead of #N/A Mr Mike Excel Worksheet Functions 4 May 25th 05 04:51 PM
make a vlookup using a variable path Alex St-Pierre Excel Worksheet Functions 1 March 2nd 05 11:54 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM
VLOOKUP not working Scott Excel Worksheet Functions 3 November 12th 04 08:06 PM


All times are GMT +1. The time now is 02:19 AM.

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"