ExcelTip.com
ExcelTip.com
Account Icon Account Icon Account Icon
Google Exceltip.com
JOIN OUR NEWSLETTER
  and receive for joining:
Free eBook Learn More!
Free Excel ADD-IN
Free Weekly Excel Tip
4 e-books in cd-rom
F1 Formulas & Functions
F1 Formulas & Functions
F1 EXCEL
F1 eBook (Spanish)
F1 EXCEL
Financial Statements.xls
 

» Combine the VLookup and Match formulas in Microsoft Excel
CATEGORY: Lookup Formulas


The VLookup formula returns data from any column you choose in the data table, simply change the number of the column in the third argument.

Although it sounds simple, there is a catch.
  • How can you determine the number of a column in a data table that contains numerous columns?
  • How can you easily change the number of the column in the third argument of the VLookup formula?
  • How can you easily change the column number in multiple formulas in a worksheet from which complex reports are prepared or in a sheet that contains multiple VLookup formulas?


Solution

Insert the Match formula in the third argument of the VLookup formula.


Step 1: Define 2 names, see screen shot

  1. Select Row 1, press Ctrl+F3, type the name Row1 in the Names in workbook field, and click OK.

  2. Select the data table by pressing Ctrl+*. Then press Ctrl+F3, enter Data in the Names in workbook field, and click OK.

Step 2: Enter the Match formula

  1. Open an adjacent worksheet, and select cell A1.

  2. In cell A1 type 4/1/2001.

  3. In cell B1, enter the formula =MATCH (A1, Row1, 0).
    (Be careful to enter the value 0 in the third argument to specify the search for an exact value.)

  4. Results of calculation: 7.

Step 3: Enter the Vlookup formula

  1. Enter the account number 201 into cell A2.

  2. Enter the formula =VLOOKUP(A2,Data,B1) in cell B2. In the third argument of the VLookup formula, select a cell which contains the Match formula.

  3. Calculation results: 7,981.

  • Step 4: Combine the formulas

    1. In the formula bar (Match formula) of cell B1, select the formula without the = sign, press Ctrl+C, and click the Cancel sign (from the left of the formula in the formula bar). Select cell B2, and in the formula bar, select the address B1.
    2. Press Ctrl+V and press Enter.

    3. The final result is a nested formula is
      =VLOOKUP (A2, Data, MATCH(A1, Row 1, 0))

  • Screenshot // Combine the VLookup and Match formulas in Microsoft Excel

    Combine the VLookup and Match formulas in Microsoft ExcelCombine the VLookup and Match formulas in Microsoft Excel
    Rate this tip
    12 34 5
      RATING: 2.76
      VIEWS: 147642

    READER COMMENTS (view all comments)


    nesting as shown did not work
    ranjit kumar wrote on December 31, 1969 19:00 EST
    I could easily do all the steps as shown above. I appreciate the way the entire description was given but i fail to do the last step wherein the two formulas are nested. The nesting is not happening. Please provide screen shots for step NO: 4 more elaborately
    Finding Problem in Multiple Results
    M.Jubbar wrote on December 31, 1969 19:00 EST
    =VLOOKUP(B5,Sheet1!B15:F18,2,0)
    Searching Data with Vlookup function.
    and chosing the resulting values one after another.
    Like.
    For a unique result ===> =VLOOKUP(B5,Sheet1!B15:F18,2,0)
    For More then one resulting values...
    =VLOOKUP(B5,Sheet1!B15:F18,2,1)
    with every change in last fiqure finding the next resulting value...
    Help me on this query i Shall be very thank ful....
    jubbar007@yahoo.com
    Multiple Condition VLOOKUP
    Lana wrote on December 31, 1969 19:00 EST
    Hello

    I am trying to return a value that fulfills a multiple VLOOKUP, i.e. there will be multiple lines for the first condition value of 3996592, and I wish to return a value from the specific line which contains another value of 015. Is there any way to do this?



    REGISTERED USERS - Click here to post comments


    GUESTS (Click here to register)
    Name
    Comment Title
    Comments

    Rich Dad's Guide to Investing: What the Rich Invest in, That the Poor and the Middle Class Do Not!

    Financial Reporting and Analysis (2nd Edition)

    The Essential 55: An Award-Winning Educator's Rules for Discovering the Successful Student in Every Child

    Special Edition Using Microsoft Office XP

    How to Use Financial Statements: A Guide to Understanding the Numbers

    The Interpretation of Financial Statements

    RELATED MICROSOFT EXCEL TIPS


    Convert PDF Files to Excel


    Excel VBA books
    Accounting books
    Business Plans
    MS Office books
    Taxes books

    VIEW ALL BOOKS


      Advertise With Us                               

    Tips

    Add-In in VBA | Applications - Word, Outlook in VBA | Array Formulas | Cells, Ranges, Rows, and Columns in VBA | Counting | Custom Functions | Custom Functions in VBA | Database Formulas | Database in VBA | Date & Time Formulas | Date & Time in VBA | Events in VBA | Excel 2003 | Excel Chart | Excel Consolidating | Excel Counting | Excel Custom Functions using VBA | Excel Customizing | Excel Data | Excel Dates | Excel Editing | Excel Files | Excel Filter | Excel Format | Excel Formula | Excel General | Excel Grouping and Outlining | Excel Importing Text Files | Excel Information | Excel Keyboard Shortcuts | Excel Loan Formulas | Excel Macros - VBA | Excel Pivot Tables | Excel Printing | Excel Range Name | Excel Security - Protection | Excel Sorting | Excel Style | Excel Subtotals | Excel Summing | Excel Text | Excel Time | Excel Tools | Excel Worksheet, Workbook | Files, Workbook, and Worksheets in VBA | Financial Formulas | Formating in VBA | General Topics in VBA | Import and Export in VBA | Information Formulas | Keyboard & Other Shortcuts in VBA | Keyboard Formula Shortcuts | Links between Worksheet and Workbooks | Links in VBA | Logical Formulas | Lookup Formulas | Mail - Send and Receive in VBA | Menus, Toolbars, Status bar in VBA | Modules, Class Modules in VBA | Other Q&A Formulas | Printing in VBA | Protecting in VBA | Summing | Text Formulas | User Forms, Input boxes in VBA | Using Loops | Working with Formulas |

    Tips by Version

    Microsoft Excel 97 | Microsoft Excel 2000 | Microsoft Excel 2002 | All Microsoft Excel Versions | New in Excel 2002 | New in Excel 2003 - Office 11

    Website

    Home | Tip of Hour | Recommended Tips | Most Viewed Tips | Tips by Version | Submit a Tip | My Tips
    Microsoft Excel Tutorials | Excel Links | Write for Us | About Us | Search Results | Tip Archives | Excel Forum | Excel Forum Archives

    Excel Book

    Excel 97 Book | Excel 2000 Book | Excel 2002 Book | Excel XP Book | Book Store

    Terms and Conditions of use
    The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

    Copyright © 2003 ExcelTip.com
    Microsoft, Microsoft Excel is a U.S. registered trademark of Microsoft Corporation
    Site Developed By: Varien