+ Reply to Thread
Results 1 to 5 of 5

changing background color in a single cell depending on text shown.

Hybrid View

  1. #1
    Registered User
    Join Date
    01-03-2013
    Location
    nc
    MS-Off Ver
    Excel 2003
    Posts
    7

    changing background color in a single cell depending on text shown.

    Hello,
    New to the forum, have used the search button and done internet search and do not seem to find what I am looking for.

    I have a cell that I want to change background colors depending on the results in the cell. For example if the cell reads Valid I want the background to be green. If the cell reads Invalid I want the background color to be red.

    I can make it work with conditional formats as long as the cell contains numeric values, but not when it reads text.

    I have used excel for years for very simple things, but this is kicking my butt. Any help or advise would be appreciated.

    I have attached a sample work sheet or what I am trying to do.
    example.xls

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: changing background color in a single cell depending on text shown.

    hi there, welcome to the forum. select the range you want to apply to (i.e. A4)
    in Excel 2007 & above, go to Home -> Conditional Formatting -> New Rule -> Use a formula to determine which cells to format -> Format values where this formula is true:
    in Excel 2003, go to Format -> Conditional Formatting -> Formula is:
    =A4="Valid"
    Format green

    repeat the steps but use this formula for red:
    =A4="Invalid"

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: changing background color in a single cell depending on text shown.

    HI Cause,

    Welcome to the forum.

    Use the formula like =A4="Valid in conditional formatting.. see attachment for more details.. thanks.

    example(13).xls

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  4. #4
    Registered User
    Join Date
    01-03-2013
    Location
    nc
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: changing background color in a single cell depending on text shown.

    Wow thanks for the quick responses and the help. You guys are far better at this than I am. I figured it could be done, but that solutions never crossed my mind, obviously.

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: changing background color in a single cell depending on text shown.

    great..!!

    If that helped, suggest you to mark this thread as [SOLVED].. thanks.


    Regards,
    DILIPandey
    <click on below * if this helps>

+ 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