+ Reply to Thread
Results 1 to 11 of 11

userform that will search name and pull results from a seperate workbook

  1. #1
    Registered User
    Join Date
    10-25-2012
    Location
    Phoenix, Az
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    20

    userform that will search name and pull results from a seperate workbook

    I have created a basic spreadsheet with multiple columns and will be entering data daily to the fields. However, I will have others using the form to search for people on the spreadsheet and they would prefer having a command "Search" button for a person(s) name instead of using filters. I have a command button on Sheet 1 and the spreadsheet on Sheet 2. I would like to have the command button pull a userform that would allow a text box to enter a person(s) name and it would pull on the enteries for that person on Sheet 2. Any assistance would be most helpful.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    08-27-2012
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: userform that will search name and pull results from a seperate workbook

    Any chance you could populate that with some sample information/examples? Like where are you searching these names from and where do you want the "Found" names displayed?
    Piggy

  3. #3
    Registered User
    Join Date
    10-25-2012
    Location
    Phoenix, Az
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    20

    Re: userform that will search name and pull results from a seperate workbook

    Thank you for the response Oredigger90. I have provided a few examples in the new attachment. I like to create a Userform to search the "Analyst Responsible" and "Manger Responsible". I have added the command button however I need assistance in creating the actual userform and cooresponding vba code.
    Attached Files Attached Files
    Last edited by Sway1978; 10-25-2012 at 04:22 PM.

  4. #4
    Registered User
    Join Date
    08-27-2012
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: userform that will search name and pull results from a seperate workbook

    Ok I get what you're saying. Kudos on the Superhero names as well. You want all the names that match in both those columns? One name at a time or two?

  5. #5
    Registered User
    Join Date
    10-25-2012
    Location
    Phoenix, Az
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    20

    Re: userform that will search name and pull results from a seperate workbook

    LOL thanks comics are my thing

    Ideally what they (other users) want to do is open the document. They will see on Sheet 1 the command button "search" when they click it, it will open a userform that will allow them to search by either the Anaylst full name or the managers full name. As far as where the results are displayed it can be on sheet 1 or filtered on sheet 2. They just want ALL the enteries from the "Search" to pull up.

  6. #6
    Registered User
    Join Date
    10-25-2012
    Location
    Phoenix, Az
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    20

    Re: userform that will search name and pull results from a seperate workbook

    So, If I type Bruce Banner it will pull ANY entry with his name and it will display the information that was entered in the spreadsheet (A2:H2)

    I hope I'm explaining it correctly

  7. #7
    Registered User
    Join Date
    10-25-2012
    Location
    Phoenix, Az
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    20

    Re: userform that will search name and pull results from a seperate workbook

    Okay so I played around with some code and I'm able to access the Userform and its designed the way I need it. However when I click Search in the userform I am getting an

    Run time error '1004'
    application - defined or object - defined error


    I will attach the spreadsheet with the code I was able to write, please feel free to modify
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    08-27-2012
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: userform that will search name and pull results from a seperate workbook

    Ok I'll get back to you soon

  9. #9
    Registered User
    Join Date
    08-27-2012
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: userform that will search name and pull results from a seperate workbook

    Attached is my solution. I don't know how to insert a userform, so I just used a module combined with a message box for the Search button. This works on mine, so you can either tweak it to your userform code or use my solution. It will search both columns for the name given and display the results on the Results tab.

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    10-25-2012
    Location
    Phoenix, Az
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    20

    Re: userform that will search name and pull results from a seperate workbook

    Thank you . I am unsure how to use Module but I will create a test database to figure it out. fingers crossed

  11. #11
    Registered User
    Join Date
    10-25-2012
    Location
    Phoenix, Az
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    20

    Re: userform that will search name and pull results from a seperate workbook

    I am having difficulty adapting the code to work for my userform. Are there any step by step guides on using Module? or is there a way I can see what you did in Excel? So, I can have a better understanding how to use a Module?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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