+ Reply to Thread
Results 1 to 14 of 14

search box questions

  1. #1
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    search box questions

    i have a command button that brings up a search box and i enter a name and it searches all my sheets one at a time. and i get a message for each result on each worksheet the name is found on that i have to close individually). I would like to have it instead find all the records and display them in a window and then be able to select the record I want from the sheet i want, and have it go to that sheet and record. So the results box should show possible results from all pages but should give a preview of that result.

    so if i type in "Smith" it should show something like
    Last Name First Name Auto Ship AS date Stree Add City State Sheet Name
    Smith John 3YA 7/15/2015 1223 my street My town NY Sheet 1
    Smith Bill 555 your street Paris CA Sheet 2

    Then be able to click on one of the results and go to that page.

    Here is what i have for code now.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: search box questions

    You are going to need to create a UserForm for what you want to do. Submit your workbook.

  3. #3
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: search box questions

    ok how do i add the user form and such.
    Here is a sample of my workbook.
    test.xlsm

  4. #4
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: search box questions

    Can anyone assist?

  5. #5
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: search box questions

    Quote Originally Posted by compgeek1979 View Post
    Can anyone assist?
    I'm working on something for you. Give me some time.

  6. #6
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: search box questions

    Test this and let me know.
    Attached Files Attached Files

  7. #7
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: search box questions

    I found an error.
    Use the code below.

    Please Login or Register  to view this content.
    Last edited by skywriter; 07-22-2015 at 03:10 PM.

  8. #8
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: search box questions

    OK let me test a bit and ill let you know. Thanks for all your help.

  9. #9
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: search box questions

    I saw a name Cho and did a search and it brought up a lot of other names, all of then have cho somewhere in their name.

    If you want to only find exactly the name you type in then you need to change the .find line of code to this.
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: search box questions

    is there a way to make the results come up in a user form rather than a sheet?

  11. #11
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: search box questions

    Quote Originally Posted by compgeek1979 View Post
    is there a way to make the results come up in a user form rather than a sheet?
    I would like to have it instead find all the records and display them in a window and then be able to select the record I want from the sheet i want, and have it go to that sheet and record. So the results box should show possible results from all pages but should give a preview of that result.
    Sure sounds like what I went to a lot of effort to give you.
    You're welcome.

  12. #12
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: search box questions

    Please don't get me wrong, i appreciate it. and it works great and is very usable. I was just hoping to have it come up in a separate window (or user from) like the search box does. To me, it is more visually appealing so that it's not switching pages during the search in case i want to search for something else.

  13. #13
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: search box questions

    Also can i have the results sort by name (Column A then Column B) rather than by sheet?

  14. #14
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: search box questions

    ok so I am having trouble converting your code to a listbox and was hoping you could help me.

    the listbox (userform) code is from another workbook i use. I am trying to convert but i am too confused.

    first here is your code:
    Please Login or Register  to view this content.
    then here is the code from from the listbox(userform):

    Please Login or Register  to view this content.
    please help me out.

+ 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: 4
    Last Post: 11-08-2014, 04:57 AM
  2. VBA Code - Search text & search number & search qty and result - Urgent Please
    By naresh73 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2014, 10:51 AM
  3. Two questions regarding search formulas
    By Stefan48 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-10-2013, 01:16 AM
  4. I'm new to VBA and i will be asking a lot of questions!
    By HoerbigAdm in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 09-12-2012, 09:14 AM
  5. questions that aren't really excel questions
    By martindwilson in forum The Water Cooler
    Replies: 1
    Last Post: 03-11-2012, 08:21 PM
  6. Hello, and 2 questions.
    By RockECU in forum Excel General
    Replies: 2
    Last Post: 01-31-2009, 09:02 PM
  7. [SOLVED] Max / IF questions
    By G in forum Excel General
    Replies: 1
    Last Post: 10-11-2005, 11:05 PM

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