Translating Lotus VLOOKUP to Excel VLOOKUP

Last reviewed: November 2, 1994
Article ID: Q32509
The information in this article applies to:
  • Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a, 5.0
  • Microsoft Excel for OS/2 versions 2.2, 2.21, and 3.0

Summary:

If you translate a Lotus 1-2-3 macro that uses the VLOOKUP function, the macro does not work in Excel for Windows or Excel for OS/2.

More Information:

There are inherent differences in the operation of the Lotus VLOOKUP and the Excel VLOOKUP that can cause translation problems. The syntax for both functions is very similar, as in the following example:

   Lotus: @VLOOKUP(lookup_value,table_array,col_index)

   Excel: =VLOOKUP(lookup_value,table_array,col_index)

In both Lotus and Excel, the lookup_value specifies a value to look for in the range specified by table_array. However, the col_index is treated differently in each product.

In Excel, the col_index is any value from 1 to the number of columns in the table_array. Any value not within this range results in an error. The table_array values in that column must be sorted in an ascending order.

In Lotus, the col_index may be any positive or negative integer that does not exceed the the width of the spreadsheet. The corresponding table_array values may or may not be sorted.

This difference can result in errors when translating Lotus 1-2-3 macros to Excel macros.


KBCategory: kbusage
KBSubcategory:

Additional words: 5.00 3.0 3.00 123 1 2 3 2.2 2.0 2.10 2.10 2.00
4.00 4.0


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.