+ Reply to Thread
Results 1 to 3 of 3

Color specific text within a cell

  1. #1
    Registered User
    Join Date
    10-05-2019
    Location
    USA
    MS-Off Ver
    2010
    Posts
    2

    Color specific text within a cell

    Hello,

    I have an Excel spreadsheet with a lot of tags (such as <br>, <red>) and I would like to highlight each tag with a different color. These tags can appear multiple times within a cell.
    I found the following macro:

    Please Login or Register  to view this content.
    The problem is that it colors only the first instance of each tag per cell. Unfortunately I know nothing about VBA macros, so I can't figured out how to modify it in order to color every single tag.
    Would anyone be able to help me solve this issue?

  2. #2
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,401

    Re: Color specific text within a cell

    Quote Originally Posted by Vermeil View Post
    I have an Excel spreadsheet with a lot of tags (such as <br>, <red>)
    How many is "a lot"?

    Can you list them for us?

    Also, how many cells will have to be processed... just one or a lot?

    If one, which one? If a lot, which column or row are they in?

  3. #3
    Registered User
    Join Date
    10-05-2019
    Location
    USA
    MS-Off Ver
    2010
    Posts
    2

    Re: Color specific text within a cell

    Thank you for your reply.

    There are thousands of tags in the file, but only 4 different kinds: < br >, < red >, < black >, < green > (without spaces, I had to add them or it wouldn't let me reply for some reason).

    And a lot of cells need to be processed, the file has 4344 rows (although not all of them contain tags). They're located in columns I, M, P and S. If that's too much, only M and P really matter.

+ 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. Change Font Color of cell if another cell contains specific text
    By Cubajz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-11-2017, 05:19 AM
  2. if cell A2 contains specific text - color the background of cell G4
    By rad1964 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 07-25-2016, 12:46 PM
  3. [SOLVED] Change Color of cell based on specific letter / text
    By steven_e in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-23-2013, 04:46 PM
  4. Replies: 0
    Last Post: 03-12-2013, 04:29 PM
  5. Formatting Cell Color to Specific Text
    By andreabeas in forum Excel General
    Replies: 9
    Last Post: 03-25-2009, 03:54 PM
  6. Change color of specific text within a cell?
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-13-2006, 12:35 PM
  7. count by specific text color in range of cell
    By Tii99 in forum Excel General
    Replies: 2
    Last Post: 04-04-2006, 04:58 AM

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