+ Reply to Thread
Results 1 to 20 of 20

Finding partial match in databse with FILTER and XLOOPUP

  1. #1
    Registered User
    Join Date
    07-10-2010
    Location
    Netherlands
    MS-Off Ver
    MS 365 Apps for enterprise - Excel v. 2402
    Posts
    15

    Finding partial match in databse with FILTER and XLOOPUP

    Hi all, I'm running into an issue with a database I'm building.

    The database contains for argument sake 10 people who all have multiple hobbies (seperate column) and interests (seperate column). Some have only 1 hobby, others have up to 4. Some hobbies overlap, some don't.

    When looking for the hobby 'darts' I want to return the rows with all people that have either darts as their only hobby, or as one of their few hobbies. I believe I can do this through finding a partial match with COUNTIF - but I am failing. I have attached the worksheet where I'm able to do this based on exact matches, the formula I used for that is: =FILTER(Testsheet!J5:L8;(XLOOKUP(G$5;Testsheet!J4:L4;Testsheet!J5:L8)=H5))

    partial match.PNG

    If anyone could point me in the right direction I would be much obliged!

    Thank you,

    Aeth
    Attached Files Attached Files
    Last edited by AliGW; 04-15-2024 at 03:38 AM. Reason: No need to edit the thread title when SOLVED tag is applied.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Finding partial match in databse with FILTER and XLOOPUP

    Administrative Note:

    Is your forum profile showing the Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Finding partial match in databse with FILTER and XLOOPUP

    Sorry - I really don't understand what you are aiming for here. You don't appear to have mocked up your expected results anywhere. Also there are no 'people' - how can I tell whose hobbies are which?

  4. #4
    Registered User
    Join Date
    07-10-2010
    Location
    Netherlands
    MS-Off Ver
    MS 365 Apps for enterprise - Excel v. 2402
    Posts
    15

    Re: Finding partial match in databse with FILTER and XLOOPUP

    My apoligies, I have tried clearing up the desired outcome in the attached file.

    EDIT: typo
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Finding partial match in databse with FILTER and XLOOPUP

    And your Excel version? Obviously NOT 2003 any longer. Please update your profile.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Finding partial match in databse with FILTER and XLOOPUP

    Try this:

    =LET(f,FILTER(F6:L9,F5:L5=B6),FILTER(E6:J9,ISNUMBER(FIND(C6,f))))
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-10-2010
    Location
    Netherlands
    MS-Off Ver
    MS 365 Apps for enterprise - Excel v. 2402
    Posts
    15

    Re: Finding partial match in databse with FILTER and XLOOPUP

    I've updated my profile, sorry about that.

    Thank you for your answer - it does the trick when using only one filter, but I can't seem to make it work when adding additional filters. In the attached version I have added a 2nd criteria; Interest_List to match 'Walking'. In this instance when applying both criteria the only match that should show up is Rachel.

    I tried copying your 'LET' formula and extending it with both (AND) and through * to include the second filter but did not manage.

    In the end there will be 22 different filters, each with their own list of criteria to filter with. In a different sheet I managed to make this work through with FILTER & XLOOKUP only.
    Attached Files Attached Files

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Finding partial match in databse with FILTER and XLOOPUP

    Why did you not show multiple criteria in the sample? Is there anything else you haven’t mentioned?

    I’m offline now, but will look again tomorrow.

    Are you using 365? That’s what needs to be in your profile.

  9. #9
    Registered User
    Join Date
    07-10-2010
    Location
    Netherlands
    MS-Off Ver
    MS 365 Apps for enterprise - Excel v. 2402
    Posts
    15

    Re: Finding partial match in databse with FILTER and XLOOPUP

    I've updated my profile again, sorry about the incompleteness.

    I did not mention the multiple filters as I thought I would be able to solve that as long as I could figure out the partial match - but I was indeed wrong. I've updated the worksheet to reflect the use of multiple filters & criteria better. Hope it is clear?
    Attached Files Attached Files

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Finding partial match in databse with FILTER and XLOOPUP

    What's the maximum number of criteria in each list? Is it four?

    Also, is this an AND search or an OR search? Who would meet the criteria? There's no manual mock-up.
    Last edited by AliGW; 04-15-2024 at 01:36 AM.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Finding partial match in databse with FILTER and XLOOPUP

    I need you to respond to my questions.

    You green box suggests up to FOUR selections - is this to be allowed? Or will it be limited to one selection for hobbies and one for interests?

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Finding partial match in databse with FILTER and XLOOPUP

    No response ...

    So here's a guess (and I'll stop here until I get some feedback from you):

    Please Login or Register  to view this content.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    07-10-2010
    Location
    Netherlands
    MS-Off Ver
    MS 365 Apps for enterprise - Excel v. 2402
    Posts
    15

    Re: Finding partial match in databse with FILTER and XLOOPUP

    Goodmorning, sorry for the delay. I was rebuilding the entire sheet with what I am exactly trying to do, instead of using examples.

    EDIT1: the filters should be AND - so only people that meet all requirements should show up. So in this case for example people that have all the hobbies that you filtered for, if you filter for a hobby that a person doesn't have - the person should not show up in the list.
    EDIT 2: you will be able to filter for up to 5 hobbies, 5 interests, 5 lifestyles, 5 values. Right now I have not limited this yet, but I do know how to limit this for future use.

    Please see attached, I will try your solution in the meantime.
    Attached Files Attached Files
    Last edited by aethsilgne; 04-15-2024 at 02:48 AM.

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Finding partial match in databse with FILTER and XLOOPUP

    Sometimes people over-simplify their sample workbooks.

    Try this:

    Please Login or Register  to view this content.
    the filters should be AND
    OK - then we might not be there yet, but AND was not what any of your previous posts seemed to be suggesting ...
    Attached Files Attached Files
    Last edited by AliGW; 04-15-2024 at 02:57 AM.

  15. #15
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Finding partial match in databse with FILTER and XLOOPUP

    PS I've spent a couple of hours on this now, so if there are further tweaks required, please provide a COMPREHENSIVE (i.e. multiple criteria selected, not just TWO) set of sample data with mocked up results.

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Finding partial match in databse with FILTER and XLOOPUP

    I've just noticed that you have never marked any of your threads as SOLVED here. Once we are done here, I shall explain the forum's etiquette on this to you.

    I'm curious to know why you've chosen to create a database in Excel and not Access (which is a database tool). Maybe you don't have Access, although I think it should be in the Enterprise version.

  17. #17
    Registered User
    Join Date
    07-10-2010
    Location
    Netherlands
    MS-Off Ver
    MS 365 Apps for enterprise - Excel v. 2402
    Posts
    15

    Re: Finding partial match in databse with FILTER and XLOOPUP

    Thank you for your support! Learned to indeed better just share the 'real thing' instead of just an example. I managed to solve the issue with making sure ALL filters are met by changing (in blue) your formula to:

    =LET(f;FILTER(C8:C30;C8:C30<>"");
    fd;--ISNUMBER(SEARCH(TOROW(f);Database!V2:V100));
    fp;--ISNUMBER(SEARCH(TOROW(f);Database!W2:W100));
    fh;--ISNUMBER(SEARCH(TOROW(f);Database!X2:X100));
    fi;--ISNUMBER(SEARCH(TOROW(f);Database!Y2:Y100));
    fl;--ISNUMBER(SEARCH(TOROW(f);Database!Z2:Z100));
    fv;--ISNUMBER(SEARCH(TOROW(f);Database!AA2:AA100));
    FILTER(Database!U2:X100;BYROW(HSTACK(fd;fp;fh;fi;fl;fv);LAMBDA(r;SUM(r)))>COUNTIF(C8:C30;"<>")-1))

    Thank you very much for your patience and support!

  18. #18
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: [SOLVED] Finding partial match in databse with FILTER and XLOOPUP

    You don't need the fd parameter if it's not a choice option:

    Please Login or Register  to view this content.
    Glad to have helped.

    If you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

    Learned to indeed better just share the 'real thing' instead of just an example.
    The sample just needs to be REALISTIC! We would not want a sample with 100s of rows.

  19. #19
    Registered User
    Join Date
    07-10-2010
    Location
    Netherlands
    MS-Off Ver
    MS 365 Apps for enterprise - Excel v. 2402
    Posts
    15

    Re: [SOLVED] Finding partial match in databse with FILTER and XLOOPUP

    Fantastic, thank you and have a great day!

  20. #20
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Finding partial match in databse with FILTER and XLOOPUP

    You, too. I'm not 100% convinced about your 'fix', so please test it thoroughly.

+ 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. INDEX MATCH MATCH? VLOOKUP? XLOOPUP? Please help :)
    By gthemans in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-03-2021, 11:35 AM
  2. [SOLVED] Partial Match Filter
    By TPDave in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-20-2020, 06:04 PM
  3. Finding partial match in a range
    By miucus in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-24-2019, 10:14 PM
  4. finding partial text in an index match formula
    By garyaw in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 09-30-2015, 04:27 PM
  5. [SOLVED] finding partial text ,In the case of more than one match
    By fartdog01 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-20-2014, 09:20 AM
  6. [SOLVED] Finding a partial match within a column
    By kestefon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2013, 02:14 PM
  7. [SOLVED] Finding a partial match within a list on another tab
    By IN_FOR_SIN in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-21-2013, 10:33 AM

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