+ Reply to Thread
Results 1 to 3 of 3

Help needed with a search feature on a UserForm

  1. #1
    Registered User
    Join Date
    11-11-2023
    Location
    Europe
    MS-Off Ver
    365
    Posts
    6

    Help needed with a search feature on a UserForm

    Hello everyone,
    I hope you're all doing well. I'm currently working on implementing a search feature for my UserForm. While everything is functioning mostly as intended, I've encountered a challenge in displaying partial matches on a specific column.
    The search is based on two columns selected from a combobox. For the column labeled "Denumire," the partial match is working, and the results are being displayed correctly. However, for the column labeled "IDNO," the results are only shown for an exact match, and partial matches give a "No records found".
    Below the subroutine responsible for the search feature:
    Please Login or Register  to view this content.
    Also attached the file I'm working on.

    I would greatly appreciate it if you could help me figure out what I might be doing wrong.
    Thank you in advance for your assistance.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-16-2023
    Location
    Poland
    MS-Off Ver
    Excel 2019 32bit WIN10
    Posts
    88

    Re: Help needed with a search feature on a UserForm

    The data in the "IDNO" column is of numeric type. Convert them to text, e.g. using "Text as columns" and then you will be able to use partial search. The "IDNO" column should be in text format. Otherwise, the partial search code should be replaced with another one that does not use AutoFilter.

    Edit: After thinking about it, my proposed solution using Autofilter:

    Please Login or Register  to view this content.
    Last edited by Tajan; 11-29-2023 at 07:16 PM.

  3. #3
    Registered User
    Join Date
    11-11-2023
    Location
    Europe
    MS-Off Ver
    365
    Posts
    6

    Re: Help needed with a search feature on a UserForm

    Quote Originally Posted by Tajan View Post

    Edit: After thinking about it, my proposed solution using Autofilter:
    Thank you for your input Tajan!
    The solution you provided is working beautifully.
    I've started exploring other methods, as you suggested earlier, but since I'm quite new to VBA, I'm not entirely sure of what I'm doing, and how everything works.

    Thanks again for your help!

+ 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. Troubleshoot Search feature in VBA userform
    By jpham1802 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2022, 05:13 AM
  2. Replies: 2
    Last Post: 02-09-2020, 04:07 AM
  3. Replies: 6
    Last Post: 05-02-2018, 02:30 AM
  4. Combining my userform with a userform template - 'find' and 'amend' feature
    By excelconditional in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2017, 04:13 AM
  5. Text to column feature does not give the results as needed.
    By chandannasta in forum Excel General
    Replies: 1
    Last Post: 05-01-2014, 06:37 PM
  6. Creating a Search Bar Feature
    By alrichar in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-16-2012, 02:53 AM
  7. Search Feature
    By Shazz in forum Excel General
    Replies: 3
    Last Post: 11-17-2009, 09:08 AM

Tags for this Thread

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