+ Reply to Thread
Results 1 to 3 of 3

Multiple Criteria to produce one output (Match and Vlookup)

Hybrid View

  1. #1
    Registered User
    Join Date
    07-24-2012
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    6

    Multiple Criteria to produce one output (Match and Vlookup)

    I been having trouble figuring out how to get an output from two different criterias (Country and Type) from a different worksheet. What I want to do is to:

    - On the Input tab I would like to put a country and a type (either x or y)
    - Then I want to return the value that matches those two criterias lets say Country : China and Type: X , I want those values to be returned in the table located in first tab. ( See attached excel sheet)

    I been trying to use the vlookup and the match together but I cant get it to work , any help would be appreciated.

    Thank You Example.xls
    Last edited by aglopez08; 08-22-2012 at 10:55 AM.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Multiple Criteria to produce one output (Match and Vlookup)

    Firstly, do away with merged cells. They wreak havoc with Excel fomulae. If you need them for dipslay pruposes use 'center across selection' instead

    Use..
    =INDEX(Data!$C$4:$M$15,MATCH(G3,Data!$C$4:$C$15,0),MATCH($E$7,Data!$C$4:$M$4,0)+(IF($E$8="y",1,0)))

    See attached
    Attached Files Attached Files
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Multiple Criteria to produce one output (Match and Vlookup)

    First, in E3 of Data sheet add formula:

    =LOOKUP(REPT("z",25),$E$4:E$4)&"_"&E5

    copied across. This is to align the x and y to country for each column

    Then in Inputs sheet, H4:

    =IF(ISNUMBER(MATCH($E$7&"_"&$E$8,Data!$E$3:$M$3,0)),INDEX(Data!$E6:$M6,MATCH($E$7&"_"&$E$8,Data!$E$3:$M$3,0)),"")

    copied down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ 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