+ Reply to Thread
Results 1 to 20 of 20

Search and highlight only containing text

  1. #1
    Registered User
    Join Date
    07-16-2009
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    44

    Search and highlight only containing text

    I have a data base sheet...now i want to find the text,string,word into the database sheet and want the results to search-engine sheet..i can do this with the help of advanced filter but now i m not able to highlit that text what i find in the search criteria cell...please help
    Attached Files Attached Files
    Last edited by sajidbagi; 07-26-2009 at 07:54 AM. Reason: MY PROBLEM HAS BEEN SOLVED

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search and highlight only containing text

    Highlighting text WITHIN a cell string isn't standard, highlighting the cell itself is.

    Update your example workbook. Include:

    1) the macro as you have it so far
    2) before/after examples
    3) point out where things are going on if not obvious in the macro or on the sheet

    Remember, we don't know what you're after unless you present the need completely.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    07-16-2009
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Search and highlight only containing text

    Now i have attached the file again please lookinto this matter
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search and highlight only containing text

    This is the amended code for your SEARCH button:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-16-2009
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Search and highlight only containing text

    Thank u very much

  6. #6
    Registered User
    Join Date
    07-16-2009
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    44

    Question Re: Search and highlight only containing text

    Now i have one more querry from u...now i want to search by different criteria...my new file is attached
    Attached Files Attached Files

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search and highlight only containing text

    The version I already gave you works for searching by vendor name or item # or whatever you want to use. The stars aren't necessary either. Just use the one I already gave you and enter a vendor name or item #, it will work fine.

    No need to further restrict, it's ready to use.

  8. #8
    Registered User
    Join Date
    07-16-2009
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Search and highlight only containing text

    yes i know that it can also search by vendor name or item #
    but problem is this if i only want to search by vendor name or in item code

    like *k* it will also search in the all fields however i only want to searh in vendor name data

    please do it if possible

  9. #9
    Registered User
    Join Date
    07-16-2009
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Search and highlight only containing text

    Now if i want to searh only in vendor name or item # using this criteria

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search and highlight only containing text

    Sorry, I don't see you have a problem here. It's ready to use.

  11. #11
    Registered User
    Join Date
    07-16-2009
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Search and highlight only containing text

    there is a problem.....if i search only 1 into this cell it will search in item-code,vendor name , erp part number , erp vendor code , nims part #......in the whole data whereever it find 1 it will get the results.....but i dont want the results from whole columns i only want only from one column.

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search and highlight only containing text

    It seems to me then that based on the original layout where we are looking in column A where you had done the concatenation formula, you can just change the formula in that column to ONLY include the Item # and Vendor names and that should restrict it down the way you indicated.

  13. #13
    Registered User
    Join Date
    07-16-2009
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Search and highlight only containing text

    Ok i m trying to modify this code in my another data now would u please do me a favor that please would u explain your code in detail i want to learn this code......please help me

  14. #14
    Registered User
    Join Date
    07-16-2009
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Search and highlight only containing text

    i have tested this as you say but now there is one problem when i m searching by item code in the results it is changing the whole item code color rather than the containing text please look into this matter.

  15. #15
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search and highlight only containing text

    Provide an updated sheet with where you are now, include the macro and the changed column A concatenation formula and realistic search example parameters and I'll take a look.

  16. #16
    Registered User
    Join Date
    07-16-2009
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Search and highlight only containing text

    thanks for your response


    now i have attached my ammended file...there are som bugs please if you clear these i would be very thankful to u.
    Attached Files Attached Files

  17. #17
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search and highlight only containing text

    You didn't change the concatenation formula in DATABASE column A like I told you. =B3&C3 is all you need in A3, then copy down. This eliminates the information to search other columns, right?

  18. #18
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search and highlight only containing text

    Here's a new version that gives you the Vendor or Item code only search ability on sheet 3.

    1) It no longer uses column A on Sheet1 at all. Depending on which search code you enter, it searches by THAT column on sheet1.

    2) The ITEM CODES on sheet1 need to be TEXT STRINGS for this to work properly. The easiest way to convert an existing numeric value to text string is to use this in an adjacent cell:

    =B3&""

    Then copy that down the whole dataset to get the text values, then copy them and EDIT > PASTESPECIAL > VALUES over the original numbers to get a new set of text values instead.

    In the future, make sure the column is already formatted as text before entering the numbers and they will be accepted by Excel as text.

    3) Sheet3 now auto clears if you delete both search criteria

    4) Since only one search criteria is needed, the other cell will clear itself if you enter a value in the other search cell

    5) The VENDOR search will capitalize for you even if you enter "auto"...it becomes "AUTO".

    6) As soon as you enter a search string, the search will occur, no need to click a button.

    7) The CLEAR and SEARCH buttons aren't really needed anymore
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    07-16-2009
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Search and highlight only containing text

    thank you very much you help me....if i need further assistance i will have your assistance GOD bless you.

  20. #20
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search and highlight only containing text

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated)

+ 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