+ Reply to Thread
Results 1 to 18 of 18

highlight a single character substring only and not the cell

  1. #1
    Registered User
    Join Date
    04-28-2015
    Location
    U.S.
    MS-Off Ver
    2007
    Posts
    41

    highlight a single character substring only and not the cell

    Hello,
    I`m having trouble with finding a function to highlight a specific one character substring but not the cell. Example like Text only the "e" and in numbers lik 54321 only the "3"

    Thanks for any asistance.

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: highlight a single character substring only and not the cell

    But what is the logic behind which character is to be highlighted?
    Cheers!
    Deep Dave

  3. #3
    Registered User
    Join Date
    04-28-2015
    Location
    U.S.
    MS-Off Ver
    2007
    Posts
    41

    Re: highlight a single character substring only and not the cell

    Using either
    =Find()
    or
    =Search()
    Functions

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: highlight a single character substring only and not the cell

    THis is not possible with regular functions (or with Conditional Formatting), you will need VBA code for this
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: highlight a single character substring only and not the cell

    Quote Originally Posted by Daddy007 View Post
    Using either
    =Find()
    or
    =Search()
    Functions
    No, I mean how do you know which character is to be highlighted?

    You might need something like this -

    Please Login or Register  to view this content.
    Certainly not the most optimized code, but will able to do that once your requirement is clear.
    Last edited by NeedForExcel; 04-29-2015 at 02:24 AM.

  6. #6
    Registered User
    Join Date
    04-28-2015
    Location
    U.S.
    MS-Off Ver
    2007
    Posts
    41

    Re: highlight a single character substring only and not the cell

    Thanks for the reply, I am a noobie at excel
    any asistance in finding a VBA code is greatly appreciated.

  7. #7
    Registered User
    Join Date
    04-28-2015
    Location
    U.S.
    MS-Off Ver
    2007
    Posts
    41

    Re: highlight a single character substring only and not the cell

    This VBA code works great, it does highlight one character in the first active cell.
    But not the whole sheet, and I`m trying to highlight the exact character that I type in the cell.

    Example A1:CP1257

    7865
    2341
    7890
    Adfg
    RTHm
    jhuTzE

    Then I type in a text character E it highlights all the E`s on the sheet,
    Or I type in the number 7 then it it highlights all the 7`s on the sheet. If someone could optimize it that way it would really help me.

    Thanks again for your asistance,
    Greatly Appreciated.
    Last edited by Daddy007; 04-29-2015 at 06:48 PM.

  8. #8
    Registered User
    Join Date
    04-28-2015
    Location
    U.S.
    MS-Off Ver
    2007
    Posts
    41

    Highlight substring only and not the cell

    Hello everyone,

    Is there a VBA code I could use to highlight a particular substring only and not the cell.

    Example

    XYZ
    789
    tzy
    471
    ZDR
    057

    I would type the letter Z and the z would be highlighted everywhere it was found in the cell and
    the entire sheet.

    Or

    The substring number 7 that I typyed to be found and highlighted within the cell but not the cell only.

    Any asistance is greatly appreciated.

  9. #9
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Highlight substring only and not the cell

    I don't believe it is possible to 'highlight' in Excel. However it would be possible to change the colour of the Substring

    Please Login or Register  to view this content.
    !If all your troubles are solved, then so is the thread. Show this by marking it so using thread tools at the top of the page.
    If I helped do this, then please show your appreciation by awarding rep points.
    <------ Button for that is over there

  10. #10
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Highlight substring only and not the cell

    Edit: Removed post, it was incorrect.

  11. #11
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Highlight substring only and not the cell

    Try

    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  12. #12
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: highlight a single character substring only and not the cell

    Here!

    Try this -

    Make sure you select the range before running the code.. The smaller then range, the faster the code will run..

    Please Login or Register  to view this content.
    Last edited by NeedForExcel; 04-30-2015 at 03:12 AM.

  13. #13
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: highlight a single character substring only and not the cell

    Pls take a look to forum rules before you post again because this is a duplicate thread and does not comply with rule#5 of our forum.

    Since you are a new member and also you have replies in both of your threads just for this time i'll merge your 2 threads.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: highlight a single character substring only and not the cell

    Try
    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    04-28-2015
    Location
    U.S.
    MS-Off Ver
    2007
    Posts
    41

    Re: highlight a single character substring only and not the cell

    Wonderfully Coded,

    Exactly what i needed, is there a way the highlighted substring could be edited to change color like red, blue, green, or yellow.

    Thanks again & again.

  16. #16
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: highlight a single character substring only and not the cell

    For my code
    Please Login or Register  to view this content.

  17. #17
    Registered User
    Join Date
    04-28-2015
    Location
    U.S.
    MS-Off Ver
    2007
    Posts
    41

    Re: Highlight substring only and not the cell

    I would like to thank you very much for your work on this code, it was wonderfully! coded.
    This is exactly what i needed to accomplish my task.

    Thanks again!

  18. #18
    Registered User
    Join Date
    04-28-2015
    Location
    U.S.
    MS-Off Ver
    2007
    Posts
    41

    Re: highlight a single character substring only and not the cell

    Thank you for your splendid work on this code, just what i needed.

    This will get the job done.

    Thanks!

+ 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. Replies: 3
    Last Post: 08-02-2013, 12:43 PM
  2. [SOLVED] Highlight row a certain color based on a character from a cell
    By ory182003 in forum Excel General
    Replies: 3
    Last Post: 05-11-2013, 06:15 PM
  3. [SOLVED] Highlight row based on character/text string containing in cell.
    By dihris in forum Excel General
    Replies: 2
    Last Post: 12-03-2012, 11:16 AM
  4. Find and Replace the character in a substring.
    By saikumar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2009, 04:44 AM
  5. Find Character & Highlight Cell
    By J-Money in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-30-2005, 01:05 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