+ Reply to Thread
Results 1 to 7 of 7

Search Engine from multiple sheets

  1. #1
    Forum Contributor
    Join Date
    10-10-2008
    Location
    western hemisphere
    Posts
    126

    Search Engine from multiple sheets

    Hey, I have an excel file named inventory. In this file I have four different sheets, each containing two rows A & B. In A, I have numbers and in B text. By using VBA code or else, can I create a personalized form of “Search” with two boxes. One “input box” and other “the output”, when I should enter data in “input box”, the required result from different sheets may appear in “output box” in highlighted way (In a way it will be some sort of search engine from different sheets). Thanks.

    Flower R.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Flower R,

    Welcome to the Forum!

    The attached workbook has a search form added to it. It will search only columns "A" and "B" of all the worksheets in the active workbook. Case is ignored in the search, but can be changed if you like. The results are put into a ListBox on the form iin the following format: Sheet1!$A$10. Again this can changed if you want something different. I choose this format because you can use this as an address directly in Formula. Here is the main search macro...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    10-10-2008
    Location
    western hemisphere
    Posts
    126
    Thanks a lot. I shall try it. This is first time I will use VBA. Once again thanks and hoping to receive continued help.

    Flower R

  4. #4
    Forum Contributor
    Join Date
    10-10-2008
    Location
    western hemisphere
    Posts
    126
    Hello Mr. Ross,

    I have copied the micro and form on my application, but it is still not working.

    My workbook inventory contains three columns and sheet books as follows:

    A B C

    1 0123 5678 Science
    2 9123 8764 fiction
    3 0002 4567 Health

    and so on.

    when I type in search the word Science or content of column A, B, it does not show in output window. The name of the form and module are the same which you have given. I think the form code needs to be amended accordingly. Can u please help with exact coding by incorporating above data. Thanks again.
    Last edited by Flower R; 10-14-2008 at 12:19 PM. Reason: typing mistakes

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Flower R,


    I changed the user form to search for all occurances of the search term on all the worksheets. The results are listed in the list box.

    Sincerely,
    Leith Ross
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    10-10-2008
    Location
    western hemisphere
    Posts
    126
    Hello Mr. Ross,

    I am trying to work it out still feeling some problems of its achieving. sent u a message. thanks a lot.

  7. #7
    Forum Contributor
    Join Date
    10-10-2008
    Location
    western hemisphere
    Posts
    126
    Thanks a lot. The revised form is although working but I am having few problems in its total achieving.

    • The three columns in worksheets are “Text” (Even numbers have been entered as “Text”
    • The “Search Result” shows like: Sheetbooks!$C$1. I wish that it should be like; when content(value) of any Column A , B and C is entered in “Search for” text box, the result may be the value of A, B and C . An example of Sheet Books is:

    A B C
    1 0123 4567 Science
    2 1234 4678 Science fiction
    3 4321 9988 Science notes

    If I enter in “Search for” box 0123 or 4567 or Science, the result may be:

    0123 4567 Science

    I feel that following part needs to be changed accordingly.

    Please Login or Register  to view this content.

    • If there is any possibility that the content of “Search result box” when clicked by mouse be highlighted and pasted in different sheet named “result”. The first result in first row, second in second and so on.
    • Search function may please be restriction free i.e. without ‘match case’, or match entire cell contents. The quest for word science may give result of all three above example entries and then only the required one by clicking be pasted in “result” sheet. Similarly the quest for word fiction may fetch “science fiction” and “fiction related all words”.

    I thank you once again.
    Last edited by VBA Noob; 10-19-2008 at 08:33 AM.

+ 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. search in multiple cells and sheets
    By martinlall in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-01-2008, 07:24 AM
  2. Search multiple sheets
    By Sasha9876 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2008, 07:15 PM
  3. Search Engine in Excel Question!
    By Crusaders43 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 02-18-2008, 12:14 PM
  4. vlookup to search multiple sheets
    By JAZZNAURA in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-03-2007, 09:33 PM
  5. Search for Value across multiple sheets of another workbook
    By kys2000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2007, 07:18 PM

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