+ Reply to Thread
Results 1 to 9 of 9

Working code need to be expanded to multi search also.

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Working code need to be expanded to multi search also.

    HI I have below working code delivered by HA HO BE and it works great. But sometimes I need to search for more numbers. So if possible could some have a look if its possible in inputbox 2 to also type more than one example customer nr. , separated by comma and it will find them all.
    Example like this 00021366,00041568,000258789

    Please have a look at the code if this could be possible.

    Thanks in advance
    Sincerely
    Abjac

    Please Login or Register  to view this content.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Working code need to be expanded to multi search also.

    This doesn't use commas, it simply loops so you can search as many times as you want. Give it a try. One search at a time:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Working code need to be expanded to multi search also.

    Hi Jb. Just tried it now. I see the idea. But it give me a objectvariable or with block variable not set error the second time i search.

    IN this line.

    Please have a look its important i dont have to put in the search sheet again. But i think thats ok

    Have a look please.

    Sincerely

    Abjac

    this line have error

    Please Login or Register  to view this content.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Working code need to be expanded to multi search also.

    1) try removing that line completely from where it is
    2) Put this tweaked version up higher:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Working code need to be expanded to multi search also.

    HI I tried what you say it did not change anything. What ever i move higher up also. It still give and error.

    Thanks

    Abjac

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Working code need to be expanded to multi search also.

    Time to post the workbook with macro in it so I can do real testing.

  7. #7
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Working code need to be expanded to multi search also.

    HI JB ok here is the test workbook to search in and macro in module1

    Forgot to say it search in column C and also in P. And it have to be full match. I will mostly use the multi search from column C
    and here its a search with 8 digits
    Have a look thanks

    Sincerely
    Abjac
    Attached Files Attached Files
    Last edited by abjac; 09-11-2014 at 03:47 PM.

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Working code need to be expanded to multi search also.

    Here you go:

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Working code need to be expanded to multi search also.

    Hi. JB. Yes just tested it not it works like a charm. Its exactly how it should work. Thanks allot for your effort.

    And have a nice day.

    Sincerely

    Abjac

+ 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] userform search code not working
    By vickyp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-16-2013, 02:33 PM
  2. [SOLVED] Match search terms, and add data in next column. Multi search problem.
    By Wales MB in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-23-2013, 06:10 PM
  3. Building upon an INDEX and MATCH search with expanded criteria.
    By parky58 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-20-2012, 03:17 AM
  4. Search code not working
    By vampyr07au in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2011, 08:23 AM
  5. Multi select listbox code not working when 2 listboxes on sheet
    By excel_vb in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-08-2010, 10:53 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