+ Reply to Thread
Results 1 to 8 of 8

Lookup based on two criteria

  1. #1
    Forum Contributor
    Join Date
    10-31-2006
    Location
    Oslo, Norway
    MS-Off Ver
    MS 365 Business
    Posts
    286

    Lookup based on two criteria

    I have a data list which I need to look up some info based one two search criteria.

    Please see the enclosed workbook which (I hope) describes what the purpose is.

    Saturn
    Attached Files Attached Files
    Last edited by Saturn; 07-27-2013 at 10:50 AM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Lookup based on two criteria

    Hi

    Try this array formula for Frequency and copy across for headings

    =IFERROR(INDEX(G$4:G$20,MATCH("SYCJ"&291,$C$4:$C$20&$H$4:$H$20,0)),"")

    -- Array(CSE) { }, formulae are confirmed with Control+Shift+Enter.
    Not just Enter.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Lookup based on two criteria

    Hi,

    Based on the table you provided, and, assuming that the ICAO code and Runway ID for which you wish to return the Frequency are in cells A1 and B1 respectively, enter this array formula (confirm with CTRL+SHIFT+ENTER, not just ENTER) in cell C1:

    =INDEX(G4:G13,MATCH(A1&B1,C4:C13&F4:F13,0))

    Change G4:G13 in above to H4:H13 to return the Heading.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

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

    Re: Lookup based on two criteria

    Try this array formula

    With
    Frequency in B16 and
    Heading in B16

    =INDEX($C$4:$C$13,MATCH(B16&B17,$G$4:$G$13&$H$4:$H$13,0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  5. #5
    Forum Contributor
    Join Date
    10-31-2006
    Location
    Oslo, Norway
    MS-Off Ver
    MS 365 Business
    Posts
    286

    Re: Lookup based on two criteria

    Thank you very much Fotis 1991, XOR LX and ACE_XL.
    To Fotis 1991: what does "&291" in the formula stand for ?

    XOR LX' formula works perfect!

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Lookup based on two criteria

    Quote Originally Posted by Saturn View Post
    T
    To Fotis 1991: what does "&291" in the formula stand for ?
    Exactly same job that does the B1 IN XOR LX'S formula. He used cell reference, i used straight the values that you described in your sample worksheet!

    In fact,All three of us, suggested the same formula.

  7. #7
    Forum Contributor
    Join Date
    10-31-2006
    Location
    Oslo, Norway
    MS-Off Ver
    MS 365 Business
    Posts
    286

    Re: Lookup based on two criteria

    Yes, you did. Thanks again!

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Lookup based on two criteria

    ........................

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Lookup based on two criteria
    By Gillman in forum Excel General
    Replies: 7
    Last Post: 02-16-2010, 05:55 AM
  2. Lookup based on several criteria
    By the_giza in forum Excel General
    Replies: 1
    Last Post: 10-30-2006, 02:42 PM

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