+ Reply to Thread
Results 1 to 6 of 6

Searching Data with Multiple Matches

  1. #1
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562

    Searching Data with Multiple Matches

    Good Afternoon,

    A friend of mine has asked for some help on a project which is going to use Excel. I do a lot of work in Excel, but this project is needing some things that I do not routinely do. I would like to solicit some ideas from the forum.

    The project concept is simple. Have a user enter a search element, find the element, and then display the data in a user form. I have no problem coding the search and putting the results of the search on the user form. My problem is the search element may not be unique and there could be multiple matches. When this occurs we would like to be able cycle through each item until all of them have been displayed or we might want to display a list of matches and allow the user to choose which one to display.

    I am sure this is a very simple process, but seeing I dont know how to do and Im sure there are quite a few of you that do I thought I would ask for help instead of frustrating myself. I just need so general information to get started and I can take it from there.

    In my attached sample, I might want to search on the Institution ICC which has multiple entries. How would I carve the list down to just ICC and then cycle through that list putting the information on a user form. Or how would I present a list and allow the user to select what they want to display on the form.

    The actual data spans many columns and that is why we want to put it on a user form to make it more useful to the user.

    Thanks in advance for your help.
    Attached Files Attached Files
    Sincerely,
    Jeff

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    11,108
    Quote Originally Posted by boylejob
    ... I have no problem coding the search and putting the results of the search on the user form. My problem is the search element may not be unique and there could be multiple matches. When this occurs we would like to be able cycle through each item until all of them have been displayed ...
    Once you have the initial search results, save the item address. Use the .FindNext method to loop through your sheet, and exit the loop if not found or if the address matches the initial item address.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    10-11-2007
    Posts
    5
    Hello Jeff,

    I am thinking about Advanced filtering.
    See attachment.
    Attached Files Attached Files
    Last edited by LucB; 10-11-2007 at 08:29 AM.

  4. #4
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562
    Thank you to both of you. I believe this will give me a good place to start. I certainly appreciate the help and input.

  5. #5
    Forum Contributor
    Join Date
    08-28-2006
    Posts
    280
    Jeff,

    I see you already have a couple of good ideas. I started working this out last night, but I got called away this morning. I didn't get to the userform part, but I'll post it for whatever it's worth.

    Good Luck with your project.

    Dean
    Attached Files Attached Files

  6. #6
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562
    Dean,

    Thanks! I always like getting multiple responses because it gives you a variety of things to work with. Everyone has given me some great ideas to work with and now I just need to form it into something that will work for my friend.

    Again, thanks to all who responded.

+ 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