+ Reply to Thread
Results 1 to 16 of 16

Highlight specific texts in a cell with red bold font using VBA

  1. #1
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    256

    Highlight specific texts in a cell with red bold font using VBA

    Hi Experts!
    For reporting purpose i need to auto highlight the multiple strings in a cell with red bold color. It is difficult have many cells contains remarks and every time hard to highlight manually with red bold font .

    The file is attached first part is actual status in column A2 and the results required which need like in Column A4.
    Last edited by farrukh; 04-06-2017 at 10:38 AM.

  2. #2
    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
    52,929

    Re: Highlight specific texts in a cell with red bold font

    You cannot apply fonts (color, bold etc) to just a part of a cell with formulas or conditional formatting, you either apply it to the whole cell or you dont apply it. You would need VBA/macro for that
    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

  3. #3
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    256

    Re: Highlight specific texts in a cell with red bold font

    Please provide any solution ... VBA as you mentioned

  4. #4
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    256

    Re: Highlight specific texts in a cell with red bold font

    please help me out ...

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Highlight specific texts in a cell with red bold font

    I've moved your thread to the appropriate section and will add VBA to the thread title for you.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    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 specific texts in a cell with red bold font

    jindon , offered a nice solution here, in post#9.
    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.

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

    Re: Highlight specific texts in a cell with red bold font using VBA

    Merged cells...
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    256

    Re: Highlight specific texts in a cell with red bold font using VBA

    jindon Thanks the results are fine . One thing more the remarks are getting from formula cell =N2, when i try to run with formula cell all the remarks of the get red color . Is there any way it works with formula cell?

    same case in post # 6

    Capture.JPG

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

    Re: Highlight specific texts in a cell with red bold font using VBA

    No.
    If the cell is the result of formula or numeric value, it needs to be converted to a constant string value to partially format the cell.

  10. #10
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    256

    Re: Highlight specific texts in a cell with red bold font using VBA

    jindon many thanks last thing if i start string like TSF-1: FMF-1: GSM-2: SPS: So on , where i need to change because when i trying to ommit 1. 2. 3. the code not changing the color font?

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

    Re: Highlight specific texts in a cell with red bold font using VBA

    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    256

    Re: Highlight specific texts in a cell with red bold font using VBA

    I Mean like below and very sorry above of my head to get in my brain pattern
    HTML Code: 

    Capture.JPG

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

    Re: Highlight specific texts in a cell with red bold font using VBA

    Upload a workbook with before/after to avoid confusion.

  14. #14
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    256

    Re: Highlight specific texts in a cell with red bold font using VBA

    Please find uploaded file.

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

    Re: Highlight specific texts in a cell with red bold font using VBA

    Change pattern in test4
    Please Login or Register  to view this content.

  16. #16
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    256

    Re: Highlight specific texts in a cell with red bold font using VBA

    Wonderful muchAppreciated

+ 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. [SOLVED] Bold font in only part of the cell
    By coach.32 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-27-2014, 08:00 PM
  2. Bold few texts in a sentence which has a formula
    By Shradharani in forum Excel General
    Replies: 5
    Last Post: 10-11-2013, 03:56 PM
  3. [SOLVED] Bold few texts in a sentence which has a formula
    By Shradharani in forum Excel General
    Replies: 1
    Last Post: 10-10-2013, 12:34 PM
  4. How does one make a cell font bold
    By gamaz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2009, 09:48 AM
  5. Replies: 1
    Last Post: 11-07-2007, 08:45 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