+ Reply to Thread
Results 1 to 4 of 4

Autocomplete search word based on Initial first/random word

  1. #1
    Registered User
    Join Date
    11-12-2015
    Location
    Surabaya, Indonesia
    MS-Off Ver
    MS 365 (Windows 11 64-bit)
    Posts
    84

    Autocomplete search word based on Initial first/random word

    Hi All,

    I've been looking anywhere but I couldn't find the solution, please help. My problem is i want to do autocomplete search based on these condition using function in excel if possible

    1. initial first or random word that contained in the list data.
    2. the search result will be auto sorted from A to Z, not case sensitive, where the first will be the showed result search.

    what i hope is in the attachment or you can see picture below. what'll be the formula?

    so if i type "ij" the result should be Indonesia Jakarta (while 2nd result is Indonesia Jambi)
    if i type "ny" the result should be New York
    if i type "ind" the result should be India New Delhi (because, if it's sorted India New Delhi will be the first to come out)

    P.S the keyword search is not follow some rule, pattern or abbreviated. It'll be completely depend on user, ex : it could be "ijak" to refer to Indonesia Jakarta, etc.

    autocompletesearch.JPG

    thanks a lot for the help ^^
    regards
    Attached Files Attached Files
    Last edited by radian89; 11-12-2015 at 10:42 AM.

  2. #2
    Registered User
    Join Date
    11-12-2015
    Location
    Surabaya, Indonesia
    MS-Off Ver
    MS 365 (Windows 11 64-bit)
    Posts
    84

    Re: Autocomplete search word based on Initial first/random word

    Hi All,

    I've just come to a solution for this, and this works pretty well... I'll explained it to you.

    Current situation :
    1. user want to search between database, he/she doesn't remember the exact word by word contained.

    2. each data is unique and no duplicate
    ex : Indonesia, Indonesia Jakarta, Indonesia Surabaya, etc

    3. user will type random letter just to guess this unique database,
    ex : for searching data "Indonesia Jakarta", He'll type "ijkt", or "ijak",or "indojaka", and the possibilities are unlimited



    Solution : I've come up with

    Scenario 1, if it's RANDOM word / letter ex : "ijkt", "ijak", or "indojaka"
    conventional dynamic search won't do you any good, you need to breakdown each search letter by letter, and fulfill this condition.

    i use, for each n-th letter that detected on the cell you gonna search
    =IF(ISNUMBER(SEARCH(MID($B$4,E$2,1),$Q$4:$Q$20)),MAX(E$3:E3)+1,0)

    and this function, to detect, if each of those letter contained in certain word? if its true, it'll show you the search result
    =IF(IF(AND(E4>0,F4>0,G4>0,H4>0,I4>0,J4>0,K4>0,L4>0,M4>0,N4>0)=TRUE,1,0)=1,MAX($P$3:P3)+1,0)

    rumus1.JPG


    Scenario 2, if it's PART of the word ex "jakarta", "jakar", "indonesia", "indo"
    conventional dynamic search will be okay (I adapt it from youtube tutorial by my e-lesson https://youtu.be/Jr34riKGveg )

    quoted from the tutorial, the function will result part of word search
    =IF(ISNUMBER(SEARCH($B$4,$Q$4:$Q$20)),MAX(O$3:O3)+1,0)

    rumus2.JPG


    Scenario 3, how do we know, if the person type random word or part of the word?



    there'll be 2 suggestions

    1st suggestion Part of word
    partofword.JPG

    2nd suggestion Random word
    randomword.JPG

    as the 3rd suggestion will prioritize if the 1st suggestion detected, it'll come first, if not it'll be the 2nd suggestion, i just use simple function
    =IF(LEN(S4)>0,S4,T4)


    Have good day,
    wish you luck

  3. #3
    Registered User
    Join Date
    11-19-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    1

    Re: Autocomplete search word based on Initial first/random word

    Can you please share the above template it would help me - Please send me the finished or the final file. I really liked the logic

  4. #4
    Registered User
    Join Date
    11-12-2015
    Location
    Surabaya, Indonesia
    MS-Off Ver
    MS 365 (Windows 11 64-bit)
    Posts
    84

    Re: Autocomplete search word based on Initial first/random word

    Hi Syedshahab,

    My post no #2, the solution was almost perfect, yet 2 out of 10 keywords results missmatch with what the user wants. Then my colleague revised & give advise, to use different approach.
    the new idea was, to evaluate & locate each word from front to end continuously, and rank it based on the most match counted.

    here's the final (in the attachment). it gives higher accuracy, but until now we still not find miss match keyword.

    thanks
    Attached Files Attached Files

+ 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. Replies: 2
    Last Post: 04-29-2014, 10:06 AM
  2. Replies: 2
    Last Post: 08-05-2013, 04:45 PM
  3. autocomplete per word..
    By vijaynadiad in forum Excel General
    Replies: 0
    Last Post: 05-13-2013, 02:30 PM
  4. Replies: 1
    Last Post: 01-25-2011, 10:50 PM
  5. How to search for a word in a column and have entire row opaque once word is found
    By copleyr in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 09-04-2009, 07:11 PM
  6. search for a specific word and copy the word and the preceeding words until a comma
    By DHANANJAY in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-31-2005, 09:10 AM
  7. [SOLVED] Newbie trying to search and replace word in word doc from excel
    By kaiser in forum Excel General
    Replies: 5
    Last Post: 09-13-2005, 07:06 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