+ Reply to Thread
Results 1 to 5 of 5

Conditional Formatting on Specific Text within a Cell

  1. #1
    Registered User
    Join Date
    08-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    3

    Conditional Formatting on Specific Text within a Cell

    Is it possible to use conditional formatting on specific text within a cell?

    For example, a single cell contains the following: AR, IL, IN, KY, LA, MO, OH, PA, TX

    I want to change the font color of certain states based on a lookup list of states that I have. Example: AR, IL, IN, KY, LA, MO, OH, PA, TX

    I do not think this is possible with conditional formatting. Any suggestions?

  2. #2
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Conditional Formatting on Specific Text within a Cell

    Don't know about a single cell!. But if your data was different cells in column A, conditional format with a rule:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional Formatting on Specific Text within a Cell

    Thanks Kevin! It would certainly be easier if I just pulled the list apart and put it in multiple cells. I cannot think of any non-macro way to do this, so I will just find a workaround like the one you suggested. Thanks!

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Conditional Formatting on Specific Text within a Cell

    The only way to format certain characters in a string, is with VBa

    Here's one very basic way that you might want to develope further.

    1/. Define a Dynamic Named Range for the State Codes you want to highlight
    Name: "List_to_Format"
    Refers to:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    2/. In the worksheet module paste this code
    Please Login or Register  to view this content.
    Enter or change your strings in Column A

    Note If you change the lookup list the sheet will not automatically update old entries.
    That requires a slightly different approach.
    Attached Files Attached Files
    Last edited by Marcol; 10-04-2012 at 05:24 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Registered User
    Join Date
    08-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional Formatting on Specific Text within a Cell

    Marcol, That is extremely helpful. That really helps me get started. Thank you so much. You guys are great!

+ Reply to Thread

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