+ Reply to Thread
Results 1 to 17 of 17

Excel database - Finding Partial text though search tool

  1. #1
    Registered User
    Join Date
    06-09-2017
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    33

    Excel database - Finding Partial text though search tool

    Hello all,

    I have created a database that allows users to search through the database and isolate unique terms. I want the users to have the ability to search pieces of a data string. For eaxmple:

    Data: The quick brown fox
    Search Quick fox
    Search Result: The quick brown fox


    however what happens is:

    Data: The quick brown fox
    Search: Quick fox
    Search Result: nothing is found


    Desired result:
    Users have the ability to search the entire database using pieces of information that may not be in chronological order to the data.
    Attached Files Attached Files
    Last edited by Cont-Kevin; 06-12-2017 at 10:28 AM.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Excel database - Finding Partial text though search tool

    Seems to work fine if you click the button after entering something in H2... Does it?

  3. #3
    Forum Contributor
    Join Date
    01-05-2017
    Location
    New York
    MS-Off Ver
    Office 2016
    Posts
    206

    Re: Excel database - Finding Partial text though search tool

    If you search for "quick fox" the result is zero because nowhere does it say "quick fox". You need to do Contains: Quick and Contains: Fox.

  4. #4
    Registered User
    Join Date
    06-09-2017
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    33

    Re: Excel database - Finding Partial text though search tool

    Yes i need search function to have Contains: Quick and Contains: Fox. however I have no idea how this is done..

  5. #5
    Registered User
    Join Date
    06-09-2017
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    33

    Re: Excel database - Finding Partial text though search tool

    yes it works somewhat... I need my search function to allow to search using containing terms. contains: the ,contains: quick ,contains: brown ,contains: fox.. i dont know how to do this though

  6. #6
    Registered User
    Join Date
    06-09-2017
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    33

    Re: Excel database - Finding Partial text though search tool

    Quote Originally Posted by cytop View Post
    Seems to work fine if you click the button after entering something in H2... Does it?
    can you help me with this?

  7. #7
    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,209

    Re: Excel database - Finding Partial text though search tool

    With

    "The quick brown fox" in A1

    and search parameters in C1:C3 (Fox/Brown/Quick)

    then

    =SUMPRODUCT(--(ISNUMBER(SEARCH($C$1:$C$3,A1))))

    will return count of search parameters found if any term is found

    Does this help?

  8. #8
    Registered User
    Join Date
    06-09-2017
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    33

    Re: Excel database - Finding Partial text though search tool

    Hello John, I am confused as were to put that formula.. can you please plug that into the document i attached in my original post? and I can follow it from there?

  9. #9
    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,209

    Re: Excel database - Finding Partial text though search tool

    You appear to match in columns F , G and H so in C2

    =SUMPRODUCT(--(ISNUMBER(SEARCH(F8,$H$2))))

    Copy across

    IF H2 contains one or more of values in F G or H then L1, L2 or L3 will have a value.

    Not sure is this is what is required/

  10. #10
    Registered User
    Join Date
    06-09-2017
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    33

    Re: Excel database - Finding Partial text though search tool

    Yes, I want to able to have a search returned if I search only by a portion of the data in the cell.. If the data in the cell is wrench insert (modified), i want to be able to have a search result by searching wrench (modified) instead of the full "wrench insert (modified)". so i need my search to have the ability to search by each cell containing a portion of the search.

  11. #11
    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,209

    Re: Excel database - Finding Partial text though search tool

    The SEARCH I gave will do that.

    A single formula will do:

    =SUMPRODUCT(--(ISNUMBER(SEARCH(F8:H8,$H$2))))

    so if any of the words in F8:H8 are in H2, then the result will be > 0. i.e. your test in SHOW could be ...

    =IF(SUMPRODUCT(--(ISNUMBER(SEARCH(E8:G8,$H$2)))),1,0)

  12. #12
    Registered User
    Join Date
    06-09-2017
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    33

    Re: Excel database - Finding Partial text though search tool

    John, i see what your saying however I still cant get it work... is there anyway you can put your formula in the document and upload in a comment. I greatly appreciate your help

  13. #13
    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,209

    Re: Excel database - Finding Partial text though search tool

    I am not sure how you want this to work:

    If I enter "wrench insert " in H2 how are the 3 search criteria derived i,e entries in F, G and H?

    I'll be signing off as it is late here in UK: will look at tomorrow.

  14. #14
    Registered User
    Join Date
    06-09-2017
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    33

    Re: Excel database - Finding Partial text though search tool

    FGH are looking for key terms in order ie. wrench insert (modified). I was to be able to search wrench (modified) and it populate the corresponding search results. I want to be able to search out of order of the way the cells are currently formatted. if a cell has the data "cool wind" i want to be able to search "wind cool" and it find the correct data. thank you for your help

  15. #15
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Excel database - Finding Partial text though search tool

    I'm not sure that I'm clearly understanding what the goal is either, but you'll find my effort below. My interpretation is that you want to be able to put search term(s) in H2 and find out which items from your table contain all of those terms, but you're frustrated because all of the easy solutions require that the terms in H2 exactly match the word order of the way they appear in the table. If I've got that right, then my first thought was to use a UDF, since it's already a macro-enabled file. I used the following UDF:

    Please Login or Register  to view this content.
    This function operates like SEARCH, but it independently checks each word in the search box against the cell to be searched, returning the percentage of search words that are contained in the searched cell. Matches, therefore, return a value of 1, or 100%. If the search term is "brown fox" and the searched cell is "brown leather shoes", the formula will return a .5, or 50% match (it matched one of the two search terms). Using the following in B8:

    =CONTAINS($H$2,$H8)

    ...and filling down turns column B into your key column. Filtering by 1 in that column returns all 100% matches, so your "show locations" button works the same and your COUNT cell just requires a basic COUNTIF formula. I think columns C:E are no longer needed. I also slightly modified your "show locations" code to make it more adaptable. Take a look at the attachment to see if I'm understanding things adequately. If I've got it right, your request still might be possible with a standard formula, but I wasn't seeing it. JohnTopley might have better luck; he's usually stronger with formulas than I am.
    Attached Files Attached Files
    Last edited by CAntosh; 06-12-2017 at 05:59 PM.
    If your problem has been solved, please use "Thread Tools" to mark the thread as "Solved".

    If you're grateful for this site's existence and would like to contribute to the community, please consider posting something hilarious in our joke thread:
    https://www.excelforum.com/the-water...ke-thread.html

  16. #16
    Registered User
    Join Date
    06-09-2017
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    33

    Re: Excel database - Finding Partial text though search tool

    Yes this is exactly what I need however I need to to work over the range from Columns F:J. How can I do that?

  17. #17
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Excel database - Finding Partial text though search tool

    For any who stumble across this thread, it was continued here:

    https://www.excelforum.com/excel-for...-database.html

+ 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] Search field to lookup all information in database
    By AmazingAlien in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-19-2016, 03:14 AM
  2. Search cells C1:C3000 for keyword and if exists place a keyword in A1:A3000
    By GregQuick in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-24-2015, 07:38 PM
  3. Search and retrieve multiple pieces of information
    By DarrenCl in forum Excel General
    Replies: 5
    Last Post: 04-03-2015, 05:59 PM
  4. Replies: 6
    Last Post: 03-18-2014, 11:16 AM
  5. database keyword search
    By SomeoneNamedMichael in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2012, 03:59 PM
  6. Replies: 1
    Last Post: 12-27-2010, 08:53 AM
  7. How do I allow visitors to do a keyword search of my database?
    By Ralph Jarzombek in forum Excel General
    Replies: 0
    Last Post: 03-15-2006, 08:00 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