+ Reply to Thread
Results 1 to 6 of 6

Changing the colour of selected cells based on a single value

  1. #1
    Registered User
    Join Date
    12-16-2004
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    34

    Question Changing the colour of selected cells based on a single value

    How can I change the cell colour of a selection based on the value in a certain cell?

    For example, if a value in a certain cell in row 102 is "1" I want the whole row 102 to be green, if it is "0" then the whole row to go red. See image attached.
    2017-02-24_14-10-37.png

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Changing the colour of selected cells based on a single value

    Two ways to accomplish this :

    #1 Include the row range in the Conditional Fomatting A102:Z102 or what ever is the last column used beyond Z.

    #2 Conditional Format for C102 (your pic is small so hard to tell which Column). Then use the Format Paint Brush on the entire row.

  3. #3
    Registered User
    Join Date
    12-16-2004
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    34

    Re: Changing the colour of selected cells based on a single value

    That doesn't help much. I know it can be done with Conditional Formatting is some way, but I need instructions how to do so.

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Changing the colour of selected cells based on a single value

    Example that can be done on any cell/row

    Enter a 1 in cell C8

    Left Click cell / Conditional Formatting / New Rule / Use A Formula To Determine Which Cells To Format

    Paste this formula into the formula field =$C8=1

    Click Format Color & choose color

    Click Ok

    Back at worksheet now -

    Click cell C8 / Format Painter (on Home Tab)

    Now have marching ants around C8

    Click in A8 and hold / drag as far right as desired. Lift left mouse button.

    All of row 8 now highlighted.

    If you want to apply the same rule to other rows you can :

    - highlight the row with color

    - copy and paste to another row

    or
    - with the row highlghted, click and hold on the small button lower right corner
    of highlighted area, then drag down as far as needed.

    - anytime a 1 is entered into a cell in Column C, that row will be highlighted.

    You can change the number 1 in the formula for anything that you are tracking which causes the row
    to change color.

  5. #5
    Registered User
    Join Date
    12-16-2004
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    34

    Thumbs up Re: Changing the colour of selected cells based on a single value

    Quote Originally Posted by Logit View Post
    Example that can be done on any cell/row

    Enter a 1 in cell C8

    Left Click cell / Conditional Formatting / New Rule / Use A Formula To Determine Which Cells To Format

    Paste this formula into the formula field =$C8=1

    Click Format Color & choose color

    Click Ok

    Back at worksheet now -

    Click cell C8 / Format Painter (on Home Tab)

    Now have marching ants around C8

    Click in A8 and hold / drag as far right as desired. Lift left mouse button.

    All of row 8 now highlighted.

    If you want to apply the same rule to other rows you can :

    - highlight the row with color

    - copy and paste to another row

    or
    - with the row highlghted, click and hold on the small button lower right corner
    of highlighted area, then drag down as far as needed.

    - anytime a 1 is entered into a cell in Column C, that row will be highlighted.

    You can change the number 1 in the formula for anything that you are tracking which causes the row
    to change color.
    Excellent! Very thourough instructions. Thank you for your help!
    2017-02-27_13-03-58.png

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Changing the colour of selected cells based on a single value

    You are welcome.

    Cheers

+ 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. Replies: 7
    Last Post: 10-21-2015, 02:07 PM
  2. Replies: 1
    Last Post: 06-20-2014, 05:21 AM
  3. Changing the fill colour of 2 other cells based on another cell's outcome
    By Danny1982 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-29-2014, 11:22 AM
  4. Replies: 3
    Last Post: 02-13-2014, 06:31 AM
  5. Replies: 7
    Last Post: 07-16-2012, 05:10 PM
  6. Changing a cell's colour basing on other cells' colour
    By rhua5436 in forum Excel General
    Replies: 11
    Last Post: 09-23-2010, 05:49 AM
  7. changing colour of selected cell
    By samg27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-16-2008, 08:35 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