+ Reply to Thread
Results 1 to 4 of 4

Extract data from table with multiple criteria

  1. #1
    Registered User
    Join Date
    01-13-2016
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    3

    Red face Extract data from table with multiple criteria

    Hi

    I would like to type/paste the code from table with data and retrieve other codes which match certain conditions.

    For example (check the attached picture/xls):
    • I want to know if there's another code with exactly the same description and one of the manufacturers as code 0001.
      So I copy this code, paste it in other sheet and retrieve list of codes with the same exact desc. and one of the manufacturers.

    Exact example with attached xls/img:
    I take code 0001, paste it in somewhere, the formula checks if there are other codes with this exact desc. xxx.yyyy.10%.2x5.t_tl and samsung as one of the manufacturers (4 columns with manufacturers, so somewhere in them).

    Bing! There is one match! code 0012 has the same desc. as code 0001 and the second manufacturer is the same as in first code.

    Potential issues:
    • sometimes there's no manufacturer at all, marked as 'na'
    • there are following manufacturers' columns without any data (empty)
    Attached Images Attached Images
    Last edited by weedtm; 01-14-2016 at 01:43 PM. Reason: problem solved

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Extract data from table with multiple criteria

    Not sure where you want the answer, but try this...
    =INDEX(A:A,MATCH($A2,$A:$A,0))

    Now, instead of $A2 (bolded), you would reference the cell where you enter your search code
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Extract data from table with multiple criteria

    Example:

    A22 = Code

    B22: =VLOOKUP($A22,$A$2:$E$20,2,0) Descrpition

    C22: =VLOOKUP($A22,$A$2:$E$20,4,0) Manufacturer in E

    in B23:

    =IFERROR(INDEX($A$2:$A$20,SMALL(IF(($B$2:$B$20=$B$22)*(($E$2:$E$20=$C$22)+($G$2:$G$20=$C$22)+($I$2:$I$20=$C$22)+($K$2:$K$20=$C$22)),ROW($A$2:$A$20)-ROW($A$2)+1,""),ROWS($1:1))),"")

    Enter with Ctrl +Shift+Enter

    Copy down

    Returns code, including initial code where description and manufacturer match.

  4. #4
    Registered User
    Join Date
    01-13-2016
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    3

    Re: Extract data from table with multiple criteria

    FDibbins, thanks for your reply

    JohnTopley, thanks for your help! That's exactly what I needed

+ 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. How to extract data based on multiple criteria
    By NS4Excel in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-11-2015, 07:56 PM
  2. [SOLVED] Dynamic Formula Extract Data for multiple criteria
    By Karroog in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-13-2014, 04:08 PM
  3. [SOLVED] Extract data based on multiple substring criteria
    By jspharriola in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-10-2013, 01:50 AM
  4. [SOLVED] Need a lookup to extract data table based on four criteria & override user input
    By Marvelous in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-01-2013, 12:54 PM
  5. Extract Data Based on Multiple Criteria
    By trevaaaaaaa in forum Excel General
    Replies: 2
    Last Post: 03-14-2012, 11:42 AM
  6. [SOLVED] Extract data from SQL Server table into excel using Listbox Selection as criteria
    By abhay_547 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-15-2010, 07:16 AM
  7. extract data from table that meets set criteria
    By Aaron in forum Excel General
    Replies: 1
    Last Post: 08-18-2006, 12:40 PM

Tags for this Thread

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