+ Reply to Thread
Results 1 to 4 of 4

Pulling Multiple Criteria From Data

  1. #1
    Registered User
    Join Date
    10-13-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    29

    Question Pulling Multiple Criteria From Data

    Hi All,

    I have a long list of string entries (55,000+) on one worksheet and in another worksheet I would like to pull multiple ‘different and specific’ entry types.

    A small extract from the list looks like this:

    Please Login or Register  to view this content.
    The strings I need to pull *MUST contain SJ (11,2) [Group]

    *Needs to be equal to either SKJT, SBJT, SQJT (4,4) [Project] – These codes are unique and define the string.

    *Can only contain SSA, SPD, SPA, SKE (14,3) [Type]

    In the above example, the results would show the following:

    Please Login or Register  to view this content.
    In another worksheet I am currently pulling all entries associated with [Project] codes that are defined by “S” – Or like above but more detailed “SQ, SB, SK” etc

    The equation I am using is:

    Please Login or Register  to view this content.
    Where G = the list of strings in the main worksheet

    This formula works perfectly, however, when I try to add more than one or multiple searching criteria using <> it all goes a bit haywire

    Does anyone have any thoughts, input or suggestions?

    This is probably really simple, but I am an Excel noob after all :D

    Will add [Solved] once complete. Thanks in advance.
    Last edited by klis; 06-27-2012 at 10:42 AM.

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

    Re: Pulling Multiple Criteria From Data

    Assuming database is in Sheet1, column A, starting at A2, then in B2 add a helper formula to find matches:

    =IF(AND(MID(A2,11,2)="SJ",OR(MID(A2,4,4)={"SKJT","SBJT","SQJT"}),OR(MID(A2,14,3)={"SSA","SPD","SPA","SKE"})),COUNT(B$1:B1)+1,"")

    copied down.

    Then in Sheet2, A2:

    =IFERROR(INDEX(Sheet1!A:A,MATCH(ROWS($A$2:$A2),Sheet1!$B:$B,0)),"")

    copied down.

    adjust ranges and sheetnames to suit.
    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.

  3. #3
    Registered User
    Join Date
    10-13-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Pulling Multiple Criteria From Data

    NBVC, thank you very much for your quick and informed response

    I started a new excel to test your formula, so didn't need to change the sheet names. I followed it through exactly as you outlined, however, I am receiving the #NAME? error. Can you hazard a guess as to why please

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

    Re: Pulling Multiple Criteria From Data

    I see you are using 2003... IFERROR Doesn't work there.

    Try ammending the formula to:

    =IF(ISNUMBER(MATCH(ROWS($A$2:$A2),Sheet1!$B:$B,0)),INDEX(Sheet1!A:A,MATCH(ROWS($A$2:$A2),Sheet1!$B:$B,0)),"")

+ 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