+ Reply to Thread
Results 1 to 4 of 4

changing the color of a cell based on 3 conditions

  1. #1
    Forum Contributor
    Join Date
    12-02-2010
    Location
    USA
    MS-Off Ver
    Excel 365 and sometimes excel 2013
    Posts
    172

    changing the color of a cell based on 3 conditions

    hi, in cell a1 I have integer values that can range from 1 to 100. Is there a way to get cell b1 to change colors based on the value of cell a1 and the following conditions:

    <7 red
    7 - 9 yellow
    >=10 green

    can this be done with a formula or does it need to be done in code? thx.

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: changing the color of a cell based on 3 conditions

    You can do this easily with 3 simple conditional formatting rules
    - they must be placed in sequence shown in picture
    - select cell B1 ... click on conditional formatting \ New Rule \ use formula to determine which cells to format
    formulas
    =A1>0
    =A1>6
    =A1>9

    format each one as you wish

    CF Three rules.jpg
    .
    .
    Example in attached workbook
    Attached Files Attached Files
    Last edited by kev_; 03-09-2018 at 12:22 PM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Forum Contributor
    Join Date
    12-02-2010
    Location
    USA
    MS-Off Ver
    Excel 365 and sometimes excel 2013
    Posts
    172

    Re: changing the color of a cell based on 3 conditions

    thx! this works great!

  4. #4
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: changing the color of a cell based on 3 conditions

    you are welcome
    Please mark thread SOLVED (ThreadTools@TopOfThread)

+ 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: 3
    Last Post: 08-18-2014, 12:47 PM
  2. Changing Cell Colours Based on Conditions
    By NatalieEC in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2014, 11:26 PM
  3. Changing color of one cell based on multiple conditions of others
    By oldarmy90 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-22-2013, 11:13 AM
  4. [SOLVED] Changing fill color of shapes based on changing cell value
    By Stefan1983 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-25-2012, 10:33 AM
  5. Changing colour of a cell based on several conditions
    By jennapayne in forum Excel General
    Replies: 2
    Last Post: 03-31-2011, 09:03 AM
  6. Replies: 3
    Last Post: 03-23-2010, 06:50 PM
  7. changing cell color based on changing values
    By tvonbehren in forum Excel General
    Replies: 2
    Last Post: 09-16-2009, 12:33 PM

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