+ Reply to Thread
Results 1 to 3 of 3

Userform search data by multiple criterias

  1. #1
    Registered User
    Join Date
    06-09-2015
    Location
    Brazil HU3HU3
    MS-Off Ver
    2007
    Posts
    5

    Question Userform search data by multiple criterias

    Advise: Broken English Ahead! hahahah

    I have a problem, and i can't find the solution on the internet.

    I have a Userform where there are these 3 following fields: date , Line and Model Number. the user gonna insert a especific object model number, once he changes the field, the program will look for the related information, but i got 3 fields as criterias:

    1 - DtPicker1: Date (Example: dd/mm/yyyy)
    2 - TextBox1: Line (Example: EM01 , EM03, EM04)
    3 - TextBox2: Model Number (5555,4444,3333,1234)

    my database may have more than 1 field in column A:A with the same date,
    same case in colum B:B,
    same case in model number column(C:C).

    i want to find the specific cell or the specific row which respect my 3 criterias

    thanks so much!

    sorry if i wasn't so clear!

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Userform search data by multiple criterias

    Hi SamGeron and welcome to ExcelForum,

    I generally use one of the following two methods to solve problems similar to yours:

    1. Arbitrary Master Item Algorithm
    a. Arbitrarily designate either the Date, Line or Model Number as the MASTER ITEM.
    b. Search for the Master Item in the SpreadSheet.
    c. When the Master Item is Found, then examine other columns in the row to see if the other items MATCH your search criteria.
    d. Continue b. and c. until either a match or matches are found, or until there is no more data in the spreadsheet and you have NO MATCH.

    2. Helper Column Algorithm
    a. Add a 'Helper Column' in the spreadsheet that contains the Date, Line and Model Number concatenated together, usually with an arbitrary separator character. For example:
    Please Login or Register  to view this content.
    b. When you search from the UserForm concatenate the search criteria as in a. above.
    c. Perform your search on the 'Helper Column' for an exact match.

    I hope this helps.

    Lewis

  3. #3
    Registered User
    Join Date
    06-09-2015
    Location
    Brazil HU3HU3
    MS-Off Ver
    2007
    Posts
    5

    Re: Userform search data by multiple criterias

    Dude,

    thank you so much,

    I can't belive that it was so simple as the helper column

    ahhaha

    Thanks dude

+ 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. Match data and find data following search several search criterias
    By maxtymo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-05-2013, 08:18 PM
  2. Multiple search criterias.
    By franciaul in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-23-2013, 05:57 AM
  3. Multiple search criterias in one efficient line.
    By jonnyyyl in forum Excel General
    Replies: 0
    Last Post: 02-01-2012, 12:03 PM
  4. Vlookup Multiple search criterias
    By Rage in forum Excel General
    Replies: 8
    Last Post: 12-01-2010, 12:04 AM
  5. Multiple Find/Search Criterias
    By swiftcode in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2005, 01:05 PM

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