+ Reply to Thread
Results 1 to 4 of 4

Change font colour of Specific Text within specified column

  1. #1
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2016
    Posts
    140

    Change font colour of Specific Text within specified column

    Hello,

    I have entries within each cell on column 'D' in the format of;
    [SUMMARY]: This is where the summary goes, can vary in number of characters
    [U] 'date': This is where I add an update, can vary in number of characters

    (NB: I use <ALT&shift> between the first and second lines)

    I already have the following VBA that runs on the Worksheet;
    Please Login or Register  to view this content.
    I want to search for the string "[SUMMARY]:" and set the font colour for that specific string to Red and then search for the string "[U]:" and set the font colour for that specific string to green.

    Is there code that I can add to the above code that will do that.?


    Thank you.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Change font colour of Specific Text within specified column

    Hi, what you need to do is set the text in a temporary string,
    get the start position and the end position if the string you want to change the color font etc
    rebuild the text in parts and the section between start and end to take the color
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2016
    Posts
    140

    Re: Change font colour of Specific Text within specified column

    Thank you for your response Keebellah and sorry for my late response. I don't know how I would carry out your fix, I don't know the code to do it.

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Change font colour of Specific Text within specified column

    Hi,
    Can you attach a sample file (non-private/sensitive data) and I'll add the code an return, makes it easier.
    You can also look here (a quick Google search result, one of many) https://answers.microsoft.com/en-us/...0-e31e7bdfd969

+ 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. If text is of specific formt change another column colour to grey and add text in another
    By Louisa Venter in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-08-2017, 10:53 AM
  2. Replies: 0
    Last Post: 07-09-2017, 11:01 AM
  3. [SOLVED] specific colour of text and font in email body- need HTML tags
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-18-2015, 05:10 AM
  4. [SOLVED] Text Box Font Colour Change
    By Broobi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-11-2014, 07:14 AM
  5. [SOLVED] Change font colour of specific letter strings
    By Klofange in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-15-2014, 03:58 AM
  6. Replies: 1
    Last Post: 11-08-2013, 04:16 AM
  7. Replies: 1
    Last Post: 05-21-2010, 12:40 PM

Tags for this Thread

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