+ Reply to Thread
Results 1 to 21 of 21

how to do a vague look-up

  1. #1
    Registered User
    Join Date
    09-27-2014
    Location
    Africa
    MS-Off Ver
    2013
    Posts
    50

    how to do a vague look-up

    Hi,
    I tried to write the attached the code for a vague look-up and then copy the relevant info to the blank space, but it pop-up the error showed "compile error: Expected Expression"
    dose someone can help to see which line I did not write properly?
    thks.
    Capture.JPG
    Attached Files Attached Files

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: how to do a vague look-up

    Hi,

    You are not allowed to use Name as the name of a routine. You need only change that to something else, and edit your Like line
    Please Login or Register  to view this content.
    rather than
    Please Login or Register  to view this content.
    Last edited by xlnitwit; 10-05-2016 at 04:57 AM.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: how to do a vague look-up

    Please Login or Register  to view this content.
    Kind regards
    Leo

  4. #4
    Registered User
    Join Date
    09-27-2014
    Location
    Africa
    MS-Off Ver
    2013
    Posts
    50

    Re: how to do a vague look-up

    Hi Leo,
    I tried ur code, but it displayed compile error again.

  5. #5
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: how to do a vague look-up

    It runs in file you posted


    Kind regards
    Leo
    Attached Files Attached Files

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: how to do a vague look-up

    @VBAidiot
    Change the name of the procedure to something besides Name. notName for example.

  7. #7
    Registered User
    Join Date
    09-27-2014
    Location
    Africa
    MS-Off Ver
    2013
    Posts
    50

    Re: how to do a vague look-up

    Hi Leo,
    thks for the help.
    I ran it again and it is Ok.
    But I tried to look up the model# and copy the entire row and I changed some of codes.
    unfortunately, when run the code, it showed "object variable or with block variable not set"
    does it mean if there sth. I dun define properly?
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    09-27-2014
    Location
    Africa
    MS-Off Ver
    2013
    Posts
    50

    Re: how to do a vague look-up

    Hi xlnitwit,
    thks for reminder

  9. #9
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: how to do a vague look-up

    Cod for search with textbox2

    Please Login or Register  to view this content.
    Cheers
    Leo

  10. #10
    Registered User
    Join Date
    09-27-2014
    Location
    Africa
    MS-Off Ver
    2013
    Posts
    50

    Re: how to do a vague look-up

    Hi Leo,
    Thks for helping me to solve the problem again.
    however, for the model searching, I do not want to come out too many results.
    e.g, for 8157, since I knew there is 8157A, 8157B & 8157C, I just wanna these results but not 81577A.
    so I hope when I input 8157X, that means the only one I am not sure is in "X" part, and after searching I can get the 8157A/B/C result but not the items like 81577A
    thks.
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: how to do a vague look-up

    Only 8157 in textbox2

    Please Login or Register  to view this content.
    Cheers
    Leo

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: how to do a vague look-up

    Quote Originally Posted by VBAidot View Post
    e.g, for 8157, since I knew there is 8157A, 8157B & 8157C, I just wanna these results but not 81577A.
    so I hope when I input 8157X, that means the only one I am not sure is in "X" part, and after searching I can get the 8157A/B/C result but not the items like 81577A
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    09-27-2014
    Location
    Africa
    MS-Off Ver
    2013
    Posts
    50

    Re: how to do a vague look-up

    Hi Leo,
    I input the 8157 in textbox2 & run the code, it showed the "compile error"

  14. #14
    Registered User
    Join Date
    09-27-2014
    Location
    Africa
    MS-Off Ver
    2013
    Posts
    50

    Re: how to do a vague look-up

    Hi Leo,
    I input the 8157 in textbox2 & run the code, it showed the "compile error"[/QUOTE]

  15. #15
    Registered User
    Join Date
    09-27-2014
    Location
    Africa
    MS-Off Ver
    2013
    Posts
    50

    Re: how to do a vague look-up

    Hi Leo,
    I input 8157 in textbox2 & run the code, it showed "compile error"

  16. #16
    Registered User
    Join Date
    09-27-2014
    Location
    Africa
    MS-Off Ver
    2013
    Posts
    50

    Re: how to do a vague look-up

    HI Jindon,
    thks for replying.
    But ,since I need to search the model#, so I changed the range from ("C1:C100") to (F1:F100) and input the 8157 into textbox2 and run the code, it showed "compile error"

  17. #17
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: how to do a vague look-up

    I dont have the error, so i have to compere the files

    Kind regards
    Leo

  18. #18
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: how to do a vague look-up

    Try the attached
    Please Login or Register  to view this content.
    Attached Files Attached Files

  19. #19
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: how to do a vague look-up

    Code runs by exit textbox

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

  20. #20
    Registered User
    Join Date
    09-27-2014
    Location
    Africa
    MS-Off Ver
    2013
    Posts
    50

    Re: how to do a vague look-up

    Hi Jindon,
    I tried ur code and changed the range from (C1:C100) to (F1:F100) since I will search the model#, it also appeared "compile error"
    could you pls help to check ?
    thks.

  21. #21
    Registered User
    Join Date
    09-27-2014
    Location
    Africa
    MS-Off Ver
    2013
    Posts
    50

    Re: how to do a vague look-up

    Hi Leo,
    run by exit the textbox, it is okay.
    Appreciations.
    Last edited by VBAidot; 10-13-2016 at 10:25 PM.

+ 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 do I use the "Proper" function? The instructions are vague.
    By DaveB in forum Excel Formulas & Functions
    Replies: 30
    Last Post: 09-06-2005, 07:05 PM
  2. [SOLVED] How do I use the "Proper" function? The instructions are vague.
    By Polly in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  3. How do I use the "Proper" function? The instructions are vague.
    By DaveB in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 09-06-2005, 05:05 PM
  4. How do I use the "Proper" function? The instructions are vague.
    By Polly in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  5. How do I use the "Proper" function? The instructions are vague.
    By Polly in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  6. How do I use the "Proper" function? The instructions are vague.
    By Polly in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. How do I use the "Proper" function? The instructions are vague.
    By Polly in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM

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