View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default VLookup Enhancement

I like both of your suggestions but I wouldn't hold my breath hoping for
those to be implemented.

If you use excel 2007 you can use the IFERROR function to trap #N/A:

=IFERROR(VLOOKUP(A1,F1:G10,2,0),"")

Note that this will trap *all* errors, not just #N/A.

Much better than the pedantic:

=IF(ISNA(VLOOKUP(A1,F1:G10,2,0)),"",VLOOKUP(A1,F1: G10,2,0))

Another shorter alternative:

=IF(COUNTIF(F1:F10,A1),VLOOKUP(A1,F1:G10,2,0),"")

As far as the left lookup....

=INDEX(E1:E10,MATCH(A1,F1:F10,0))



--
Biff
Microsoft Excel MVP


"Alan Perkins" wrote in message
...
I have two suggestions to improve VLookup:

1. Add an optional parameter that provides a result if the Vlookup returns
NA so that you don;t need to wrap it in an If (ISNA...

2. Make the column offset capable of negative values so that you can
offset
to the left of the reference column.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions