+ Reply to Thread
Results 1 to 5 of 5

Lookup multiple criteria in table and give row + culmn as result

  1. #1
    Registered User
    Join Date
    03-23-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    13

    Lookup multiple criteria in table and give row + culmn as result

    Hello,

    I'm trying to lookup vales in a table which are available. I want to list them up beneath the table and I want to return the value in row 1 and column A which a value is in. I saw something on this site: http://www.mrexcel.com/forum/excel-questions/231882-vlookup-return-all-matches.html , but thats only for a single row I guess? I attached a file. Hope someone can help me out with this.

    Lookup.xlsx

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: Lookup multiple criteria in table and give row + culmn as result

    Maybe something like this?
    Attached Files Attached Files

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Lookup multiple criteria in table and give row + culmn as result

    Try this...

    Data Range
    A
    B
    C
    D
    E
    F
    G
    1
    1
    2
    3
    4
    5
    6
    2
    a
    Available
    3
    b
    Available
    Available
    4
    c
    Available
    5
    d
    Available
    6
    e
    Available
    7
    f
    Available
    8
    9
    10
    Available (return values)
    11
    a
    1
    12
    b
    2
    13
    b
    3
    14
    c
    4
    15
    d
    4
    16
    e
    5
    17
    f
    6
    18


    This array formula** entered in A11:

    =IFERROR(INDEX(A$2:A$7,SMALL(IF(B$2:G$7="Available",ROW(B$2:G$7)),ROWS(A$11:A11))-ROW(B$2)+1),"")

    This array formula** entered in B11:

    =IFERROR(INDEX(B$1:G$1,SMALL(IF(INDEX(B$2:G$7,MATCH(A11,A$2:A$7,0),0)="Available",COLUMN(B2:G7)),COUNTIF(A$11:A11,A11))-COLUMN(B2)+1),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Select A11:B11 and copy down until you get blanks.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    03-23-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup multiple criteria in table and give row + culmn as result

    Thank you Tony Valko & azumi,

    It seems to work, I tried the formulas from Tony Valko. I've got one question, in the second formula, isn't it neccessarry to add dollar signs in COLUMN(B2:G7)?

    Thank you a lot!

    Bas

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Lookup multiple criteria in table and give row + culmn as result

    Quote Originally Posted by bidsinga View Post
    isn't it neccessarry to add dollar signs in COLUMN(B2:G7)?
    No.

    You're copying the formula downwards so the column references will not change. Also, the row numbers are irrelevant so if they change it doesn't make any difference. I guess we could add dollar signs to the rows just to make the formula look more intuitive:

    COLUMN(B$2:G$7)

+ 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. [SOLVED] i have multiple lookup in my excel, its give result "0" i want blank outpu.
    By vengatvj in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-25-2013, 02:05 PM
  2. Multi criteria search result to give unique answer
    By redpis in forum Excel General
    Replies: 2
    Last Post: 08-13-2013, 04:05 PM
  3. [SOLVED] Lookup from a table with multiple criteria
    By some99 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-06-2012, 02:00 PM
  4. Multiple Criteria Lookup in Table
    By Grimace in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2012, 03:21 AM
  5. Lookup multiple criteria in different tabs to return result
    By Nadir Soofi in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-06-2008, 06:28 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