Results 1 to 18 of 18

Change font color based on the ending text string (date) of a cell

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-17-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2007
    Posts
    158

    Change font color based on the ending text string (date) of a cell

    Hello!

    I have a range from Cells B2:E5. Within each cell, there is a text string with a bullet point. At the end of each text string, there is a date in the format (mm/dd) and the text string also includes these parenthesis. The text string will also sometimes either include the words "Green*", "Yellow*", or "Red*", AFTER the date or the text string could not contain any of these. However, if the text string does contain one of these words it will ONLY be one of them never two. What I want the macro to do is the following:

    - If the string DOES NOT include (Green*, Yellow*, Red*), then I want this text to be GREY.
    - If the string CONTAINS any kind of (Green*, Yellow*, Red*) AND the date within the string is today or prior, then I want this text to be RED.
    - If the string CONTAINS any kind of (Green*, Yellow*, Red*) AND the date within the string is AFTER today (in the future), then I want this text to be BLACK.


    However, there is a catch. Even though the text string can contain the words ("Green*", "Yellow*", or "Red*") I want every single one of these text string to remain their color in nature. Meaning even though the text string qualifies for a certain parameter for the string to be GREY I still want the text string that contains "Green*" to be the color green, and so on for Yellow or Red.

    Please see the example workbook attached.
    Attached Files Attached Files

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