+ Reply to Thread
Results 1 to 45 of 45

Split the results of a search in to 2 list boxes

  1. #1
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Split the results of a search in to 2 list boxes

    Hi everyone. I am trying to split the results of a search into two separate listboxes. The user would enter the date in the textbox above "Click here to see class for selected date". They would then click on the command button. I need the results from that date search to be divided into the appropriate list bos. The ones that have a Y or Yes in the "Clear" column on the worksheet to go into the listbox marked "Clear". The ones that have a N or NO in the "Clear" column to go into the listbox marked "Not Clear". Thank you for your help
    Attached Files Attached Files

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    What info is going into Clear/NonCleared listoboxes? I see you have four columns listed.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    SS number (Column A), Last (Column B), First (Column C)

  4. #4
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    And what about the search box? Wouldn't it be better to pick from the list of dates already on the sheet?

    What I'm thinking is to replaced the search textbox with a combobox with just the dates that are in column W.

  5. #5
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    If you can make that work, that sounds like a good idea

  6. #6
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Can you make it so the Combo box doesn't show past dates?

  7. #7
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Sorry to be a pain, would it also be possible to filter by column "V". So....it will show all in the ERJ for a certain class date, and all in the CRJ for a certain class date?

  8. #8
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    You'll have to have another combobox, but that won't be that much of a problem.

    What about the top Combobox? What is supposed to be in it? SSN? (Select Record By SSN?)

  9. #9
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    And do you still want to use the optionbuttons?

  10. #10
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Yes the top combo is the search of SSN and it populates the rest of the userform. It doesn't have to be done with option buttons, Do what you think would work better.

  11. #11
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    To me, the optionbuttons the way they are now are redundant.

    You could have a checkbox to toggle 'Show All Cleared and Uncleared.'

  12. #12
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Sounds good to me. lets give that a try

  13. #13
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    OK, here ya go.

    You'll notice that i don't use the result page. I read all the values straight from the info sheet.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Wait, just to be clear, when I put in a date for the class, I need to see the clear and the unclear at the same time.

  15. #15
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    Yes, as requested.

  16. #16
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    wow that works great. Thank you so much. Let me test everything and I will let you know

  17. #17
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Thank you so much. I will mark this as solved.

  18. #18
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Sorry, I found one problem. I had it set up that if I clicked on the results in the list box, the information would populate the userform with the information. I guess that went away with not using the results page. How can I fix that using what you have done.

  19. #19
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    Here ya go.
    Attached Files Attached Files

  20. #20
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Thank you very much. I think we got it. Have a great day

  21. #21
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Is it possible to take the results from the "Cleared" listbox and put them in an email?

  22. #22
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    Sure. Where do you want the button?
    And what kind of info. Just the contents of the list box?

  23. #23
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Yes the contents of the list box + ERJ/CRJ and Class Date. Just a command button anywhere I guess if that will work

  24. #24
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    OK, I think I've got it.
    Attached Files Attached Files

  25. #25
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Thank you very much. It works great. I may have more later, i hope you will be available to help.

  26. #26
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    I have one more question. Is it possible to add anther drop box for the search. I would like to add "Division" (Add column X as Division) The order would be ERJ/CRJ-->Division-->Class Date. Thanks

  27. #27
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    Added some code to the intitalize to stuff the division combobox.

    Moved the code from the cbECRJ_change event to the cbDivision_change event and added a test for division.

    There is no error checking for cbECRJ in the cbDivision event, so if you leave the cbECRJ empty, it will error out.

    Check it and if it works like it should. I can go back later and add the error checking.

    David
    Attached Files Attached Files

  28. #28
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Works Great. Go ahead and add the error checking

  29. #29
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    It is not filtering by Division when it is putting the results in the listbox. It is putting everyone with that date in the listbox

  30. #30
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    OK try this version.
    Attached Files Attached Files

  31. #31
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    It works when I use your spreadsheet. When I import the code to my actual sheets I get this error Call cmdClearFilter_Click

  32. #32
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    It says Sub or Function not defined Call cmdClearFilter_Click

  33. #33
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    Did you add the clear button?

  34. #34
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Ops...........it works now Thank you for everything

  35. #35
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Well I hope this is the last thing you can fix for me. This should complete this project. I put what I need on the userform. Thanks
    Attached Files Attached Files

  36. #36
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    Where is the creation date stored on the sheet?

    Are the added checkboxes part of the filter frame?

  37. #37
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43
    I will just add a column for the creation date in the next column.

  38. #38
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43
    If you are asking if the check boxes are apart of the other filter you created then that would be no. I need them to be separate

  39. #39
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    Have you had any luck?

  40. #40
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    Sorry. Computer died. Busy at work.........<insert excuse here>

  41. #41
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    lol Just checking

  42. #42
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Split the results of a search in to 2 list boxes

    OK, I finally eked a little time out to work on this, but it has only lead to more questions.

    Do you need the creation date on the userform? It can be added in the Add event without the user even knowing about it. (Even if you want it on the userform, it should be displayed in a label, not a textbox since you're never going to change it, right?)

    Is the Status part of the FA Applicant Information frame? I would suggest that when you click Clear, we set the value of that textbox to "Open" instead of "".

    The Chekboxes: I understand that they are a filter, but where will the results go?... Is this a continuation of the Clear/Not Clear frame?

  43. #43
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    No I don't need the creation date on the user form. I only want the "Open" to populate when a new record is added. I have it set up (not sure it is set up on the form you have, but it is on the master" to populate when a new SSN is added. The check boxes results should go to the "Not Clear" box. I need it to filter by department, and not clear.

  44. #44
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    ops, need it to filter by Department, Not Clear, and Open

  45. #45
    Registered User
    Join Date
    02-03-2014
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Split the results of a search in to 2 list boxes

    How is it going?

+ 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. Export list of search results
    By Rob007 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-23-2013, 02:29 PM
  2. List search results like in a database?
    By DJF3 in forum Excel General
    Replies: 1
    Last Post: 04-02-2009, 08:16 AM
  3. List Search Time & Then List Next Search Results on Next Available Line
    By R_S_6 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2009, 09:39 AM
  4. Search List and display results
    By morjo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-18-2008, 02:32 AM
  5. [SOLVED] copying results from multi selection list boxes to cells
    By Panos in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-03-2005, 10:06 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