+ Reply to Thread
Results 1 to 2 of 2

Search worksheet for data in multiple textboxes in userform and display in another workshe

  1. #1
    Registered User
    Join Date
    12-08-2013
    Location
    Dubai, United Arab Emirates
    MS-Off Ver
    Excel 2010
    Posts
    70

    Search worksheet for data in multiple textboxes in userform and display in another workshe

    Hello,

    Have been struggling with this one. I have a workbook with 4 worksheet that store different type of data. It also has a userform that load at start of the application which is to search the data in the workbook. The userform has a combobox where the names of the sheets are stored. when the user selects say Sheet2 in the combobox, it enables the relevant textboxes on the userform and activates the worksheet at the change event. The userform has a search button that searches all the worksheets based on the text entered in a textbox.

    The problem: my pea size of knowledge only knowz how to search based on 1 textbox. What I want is: say for e.g the end-user selects sheet2 from the combobox, this intern enables 4 textboxes (Name, DOB, Nationality, ID #) on the userform. The end-user should have the liberty to enter data in 1 and/or any of the textboxes. The search should be performed, that if data is only in 1 of any of textboxes then give all rows that fit that criteria and display in a temp worksheet. if say the name and dob is filled by the user than what matches both should be displayed in a temp worksheet. if say dob, name and ID# given so the search button should look for data that fits all 3 and display in temp worksheet. As if mentioned data can be entered in either just 1 or any or all textboxes.

    e.g the worksheet is (Columns are Name, Nationality, DOB, ID#)

    row 1 = name: Steven Martin, DOB: 27-may-1993, Nationality: Trinidad & Tobago, ID #: 1234567
    row 2 = name: Gary Richards, DOB: 2-FEB-1993, Nationality: British, ID #: 456789
    row 3 = name: David Cohen, DOB: 27-May 1993, Nationality: American, ID #: 98765
    row 4 = name: Roberto McDonalds, DOB 21-Jul-1962, Nationality: British, ID # 654321
    row 5= name: Gary Richards, DOB: 01-Dec-1978, Nationality: Australian, ID # 1234567

    now if the user enters only name as "Gary Richards" and search then row 2 and 5 should be displayed in a temp worksheet. if user enters name Roberto McDonald and ID# 1234567 then row1, row4 and row 5 should be displayed. if user enters DOB 27-may-1993 and nationality British and ID # 1234567 then it should display all these rows.

    Not sure if its possible of if I make sense at all. but if any help can be given I would be extremely grateful.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Search worksheet for data in multiple textboxes in userform and display in another wor

    Also: http://www.ozgrid.com/forum/showthread.php?t=184940

+ 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. Help: Search data in worksheet and display the data in userform text boxes
    By RAB7 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-10-2013, 05:37 AM
  2. Search data from sheet & display in the userform
    By z-eighty2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2013, 01:08 PM
  3. Userform populate listbox with search from multiple textboxes
    By chendysworld in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-12-2012, 11:12 AM
  4. userform to count cell colours and display in textboxes
    By AGrace in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-31-2011, 09:39 AM
  5. Replies: 1
    Last Post: 05-09-2006, 01:50 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