+ Reply to Thread
Results 1 to 4 of 4

How to use VLookup or match/index with multiple criteria?

  1. #1
    Registered User
    Join Date
    09-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    24

    How to use VLookup or match/index with multiple criteria?

    Hi all,

    I'm relatively new to using Vlookup. I was wondering if there's a way to use it if you have two criteria. I have a 6 column dataset: TYPE, DATE, RATE, APPLES, ORANGES, BANANAS. The 2 values in TYPE are either Sales or Cost. The values in date is just the date. Rate is either a value of 10, 18, 35, 39, 54,56,58, or 61. The values in APPLES, ORANGES, and BANANAS is the sale or cost of that fruit during that date. I want to create 3 vlookup tables, one for apples, one for oranges, one for bananas using date and rate as my criteria. Is there a way to do this?

    How do I turn this:

    Type Date Rate Apples Oranges Bananas
    Sales March 2013 10 26 46 1,245
    Sales January 2013 18 46 46 2,400
    Sales February 2013 54 64 866 3,500
    Sales April 2013 61 24 265 311
    Sales January 2013 39 13 222 333

    Into this for Bananas:
    Rate
    Date 10 18 35 39 54 56 58 61
    January 2013 2,400 333
    February 2013 3,500
    March 2013 1,246
    April 2013 311

    Thanks for your help!

  2. #2
    Forum Contributor
    Join Date
    03-11-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    107

    Re: How to use VLookup or match/index with multiple criteria?

    You're best bet is to create a helper column that identifies one of the conditions - then when you identify the last condition you just check whether the corresponding cell in the helper column is blank or not.

  3. #3
    Registered User
    Join Date
    09-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: How to use VLookup or match/index with multiple criteria?

    Could you clarify what you mean by a help column to identify one of the conditions?

  4. #4
    Forum Contributor
    Join Date
    03-11-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    107

    Re: How to use VLookup or match/index with multiple criteria?

    You create a column called DATE CHECK in Column G - the calculation in this column would be to determine whether the date of the row is valid for your search. For instance if you're date range for your above data set was for Q1 2013 rows 2,3,4,6 would return true and row 6 would be false.

    Then you can use an equation such as based on searching by rate lets say we put these rates in Column M that you are looking to match and the formula would go in N2 and we're looking for apples...
    =if(G2="","",vlookup(m2,C:F,2,false))

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1