+ Reply to Thread
Results 1 to 2 of 2

Search any text in excel lists.

  1. #1
    Registered User
    Join Date
    11-28-2007
    Posts
    45

    Search any text in excel lists.

    Hi All, I have a sheet with list of terms, i simply want to search for any item, and while i enter the alphabets, i should get all the results that "contains" that combination. Minimum letters that should be entered is 3, which means, if user enters only 2, it will search at all.

    please find the attached sheet for further reference. Thanks in advance,

    OR: Using VBA, is there a way to pass a variable to a filter ?
    I'd like to create a model with a filter where MyVar = "MyTxt". Then the user runs the code, and inputs the value for that variable, say Abc. Then MyVar= Abc is passed to the filter so that MyVar= Abc. In effect, I should have a filter(with "contains" funcion) with the text that i am entering in a cell.
    Any help will be highly appreciated.
    Attached Files Attached Files
    Last edited by prasjohn; 06-07-2010 at 07:54 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Search any text in excel lists.

    take a cell any where. if you are going to choose cell in column B take a few rows below the database for e.g. B12
    so B12 is the pivotal cell
    I have given you an event code below. if the pivotal cell is not B12 change the relevant statemnt in the event code

    right click the sheet tabl and click view code and copy this event code

    Please Login or Register  to view this content.
    now do this experiment
    1.type rro in B12 and hit enter key see what happens to the next two cells to the right
    you will get 6 and 7
    2.now type pha in B12 see what happens. you will get 4
    3.type get you will get 5
    try with various experiments.
    This will be more convenient way of doing it.


    I am returning the file where the event code is already paraked in sheet code. The name of the file is prashohn.xls
    Your can start doing the expriemnt 1,2,3 etc given above.
    Attached Files Attached Files

+ 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