Closed Thread
Results 1 to 21 of 21

Search using a Word/Phrase

  1. #1
    Registered User
    Join Date
    06-06-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    23

    Unhappy Search using a Word/Phrase

    Hi Team/All,

    Need some help, I have a sheet ful of materials, I would like to create a macro in Excel in which a person would enter the word/phrase and the macro would find the materials containing those/that phrase. It would be great if it would be something like the VLOOKUP formula, in stead of the whole word it searches for the part of the phrase.

    Example....

    Suppose one of the Material is
    ELBOW 90 S80 CPVC 2" PART#9806-020
    ELBOW 90 S80 CPVC 3" PART#9806-030
    ELBOW 90 S80 CPVC 4" PART#9806-040

    then if i give 9806-020, then it should give me "ELBOW 90 S80 CPVC 2" PART#9806-020", but if i give just 9806 then it should give me all the materials.

    It would be great if you could help, waiting for your response as early as possible.

    Hitesh

    I
    Last edited by Cutter; 08-07-2012 at 01:42 PM. Reason: Corrected title

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Seach using a Word/Phrase

    Hello there,

    Where would you like the results displayed?

    Options:
    1.Highlight found cells
    2.Userform to search and populate listbox which found cells. Clickable list box that when clicked takes you to cell
    3. Populate all found cells in another worksheet.

    Thanks!

  3. #3
    Registered User
    Join Date
    06-06-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Seach using a Word/Phrase

    Just below the "where i ll enter the word/phrase" .... thanks for yyour so quick response

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Seach using a Word/Phrase

    This should do the trick

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  5. #5
    Registered User
    Join Date
    06-06-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Seach using a Word/Phrase

    Hi Mike,

    Thanks for your reply, where do I enter the Text that i have to search for ? :| Thanks again

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Seach using a Word/Phrase

    Maybe an inputbox will work.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-06-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Seach using a Word/Phrase

    Hi Mike, Sorry to post again, but can this be displayed in sheet instead of the MsgBox, and can the input be from sheet itself like suppose B10 cell or B1 any one... Really would be helpfull

    ---------- Post added at 08:24 PM ---------- Previous post was at 08:14 PM ----------

    What does .Cells(.cells.count) do?

  8. #8
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Seach using a Word/Phrase

    It get the last cell in the range and sets LastCell

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Try this. If you upload a workbook it would be easier for me to code u up something
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    06-06-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Seach using a Word/Phrase

    Hi,

    Please find the attached file, this the data is from the macro search for things, and the Search tab is where the Data will be entered and displayed
    Attached Files Attached Files

  10. #10
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Seach using a Word/Phrase

    Hello there,

    Please see the below thread, it provides an example of a macro and dynamic ranges. The workbook is very similar to yours.

    http://www.excelforum.com/excel-gene...html?p=2884819
    Thanks!

  11. #11
    Registered User
    Join Date
    06-06-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Seach using a Word/Phrase

    Hi Rvasquez, Thanks for the reply, but that will not solve my problem

    ---------- Post added at 09:13 PM ---------- Previous post was at 09:06 PM ----------

    Hi mike, any updates really need it soon sorry I am bugging you so much

  12. #12
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Seach using a Word/Phrase

    See if this is what your wanting


    Search Data.xlsm

  13. #13
    Registered User
    Join Date
    06-06-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Seach using a Word/Phrase

    Thanks a lot for the sheet MIke you are Great outstanding.

  14. #14
    Registered User
    Join Date
    04-25-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Search using a Word/Phrase

    Hi Mike i was writing this code in the VB but i just dont know when to start a macro and when to write he code because after i write the code and execute it it doesnt show any result so please tell me when to start a macro either before writing the code or after

  15. #15
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Search using a Word/Phrase

    kumar,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  16. #16
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Search using a Word/Phrase

    kumar,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.

  17. #17
    Registered User
    Join Date
    06-13-2014
    Posts
    1

    Re: Seach using a Word/Phrase

    Hi, thanks for the file, but it keeps appearing as a read only whenever I try to save and says I cannot run a macro as a read only. Any insight?

  18. #18
    Registered User
    Join Date
    10-29-2014
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    2

    Re: Seach using a Word/Phrase

    Hey thanks for this post! This has helped me a lot!!!!

  19. #19
    Registered User
    Join Date
    10-29-2014
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    2

    Re: Seach using a Word/Phrase

    This is great but how do I add an additional column for results? This file only give two results, Material and Material Description? I need at least 4 more descriptions. Are you able to help?

  20. #20
    Registered User
    Join Date
    03-04-2015
    Location
    chandler, AZ
    MS-Off Ver
    2010
    Posts
    1

    Re: Search using a Word/Phrase

    I have a question, here at work we utilize a system that has procedures. I have tried grabbing the most relevant procedures we use and making a data base of them. The question I have is when I do a query search and the information pulls over if it is a hyperlink how is it possible to have the hyperlink to pull over with the data and still be able to use it.

  21. #21
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: Search using a Word/Phrase

    @jand13j
    Please read post #16 by arlu1201.

Closed 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