+ Reply to Thread
Results 1 to 8 of 8

Conditional formatting; 3-colour colourshades as percentage of a cell

  1. #1
    Registered User
    Join Date
    06-27-2014
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    12

    Conditional formatting; 3-colour colourshades as percentage of a cell

    Hi there!

    This is my first post on this forum. I'm Dutch. I have tried this question on a Dutch Excel support forum but to no avail. Hence, I'm trying my luck here.

    Sheet1EN.xlsx

    I have a column C with numbers in it. These are fixed values. In column E I will be entering numbers manually. I would like to compare the values in column C with those in column E. After entering a value in column E, I would like the cell to adopt a colour, depending on the percentage of the cell the same row in column C. The higher the precentage, the redder. The lower the percentage, the greener and yellow in the middle. It should be something in the line of the colourshades function in the conditional formatting.

    So if I have a value of 80 in cell C3 and in cell E3 I enter a value of 1, then E3 should turn dark green (1,25%). When I enter a value of 40 (50% of 80), then E3 should turn yellow. When I enter a value of 80 or higher ((over) 100%), the cell should turn red.

    Conditions:
    1. When no value is entered into E3, the colour of the cell should remain unchanged (white).
    2. Cells E3 until E6 should have a colour that relates to cells C3 until C6, in the sense that the colour represents a percentage of the corresponding value in the C column. The closer to 0% the greener, the closer to 100%, the redder and yellow at 50%.
    3. What I failed to manage is to hide the value of F2 in case all cells of G3 until G6 are empty. When at least one of these cells contains a value, the value of F2 should be shown; in red if it is a negative number and dark green if it is a positive numer. Black if the number is zero.
    4. A nice to have would be that the more 100% is exceeded, the darker red the cell becomes (maybe even approaching black, but then the value won't be visible anymore because is is also in black). In theory the percentage value may reach 500% although I think that the vast majority of the values will not exceed the 100% that much (if at all).

    I made the worksheet in a Dutch version of Excel, but I tried to translate the formulas into English. I hope this works.

    Your suggestions are highly appreciated! Thank you.

  2. #2
    Registered User
    Join Date
    06-18-2014
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    18

    Re: Conditional formatting; 3-colour colourshades as percentage of a cell

    Hi Jazz,

    I have made the changes. Hope this fulfills your need within the file.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-27-2014
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    12

    Re: Conditional formatting; 3-colour colourshades as percentage of a cell

    Thanks for your very quick reply.

    Unfortunately it is not exactly what I had in mind as the colours lack any disctinction in shades. It just green, yellow and red. But I would like to have 0% highlighted as dark green but 1% a bit less green and a bit more yellow; all the way up to 100% (and beyond). So the colours change gradually from everything between green, yellow and red and not just simply 3 colours.

  4. #4
    Registered User
    Join Date
    06-18-2014
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    18

    Re: Conditional formatting; 3-colour colourshades as percentage of a cell

    There's an option already available in Excel Conditioanal Formatting - Color Scales. You may check that one.
    Best Regards,
    Shaurya

  5. #5
    Registered User
    Join Date
    06-27-2014
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    12

    Re: Conditional formatting; 3-colour colourshades as percentage of a cell

    Yes, I'm aware of that. However, I don't seem to get it to work. It seems to me that this function (the percentage) relates to the different values in the E column and not to those in the C column to which I want them to relate.

  6. #6
    Registered User
    Join Date
    06-18-2014
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    18

    Re: Conditional formatting; 3-colour colourshades as percentage of a cell

    What you want is related to excel color scales.
    Unfortunately, You cannot use relative references in Conditional formatting criteria within these conditional formatting options :

    - Color Scales
    - Data Bars
    - Icon Sets

    Hence, you may the file which I sent to you with fixed 3 colors.
    Or you may apply color scales Green, Yellow, Red (decending order one).

  7. #7
    Registered User
    Join Date
    06-18-2014
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    18

    Re: Conditional formatting; 3-colour colourshades as percentage of a cell

    What you want is related to excel color scales.
    Unfortunately, You cannot use relative references in Conditional formatting criteria within these conditional formatting options :

    - Color Scales
    - Data Bars
    - Icon Sets

    Hence, you may the file which I sent to you with fixed 3 colors.
    Or you may apply color scales Green, Yellow, Red (decending order one).[/QUOTE]

    [QUOTE=spriyatam;3748313]

  8. #8
    Registered User
    Join Date
    06-18-2014
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    18

    Re: Conditional formatting; 3-colour colourshades as percentage of a cell

    What you want is related to excel color scales.
    Unfortunately, You cannot use relative references in Conditional formatting criteria within these conditional formatting options :

    - Color Scales
    - Data Bars
    - Icon Sets

    Hence, you may use the file which I sent to you with fixed 3 colors.
    Or you may apply color scales Green, Yellow, Red (decending order one).

+ 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. [SOLVED] I want a cell to meet the same colour as another / conditional formatting
    By Craigness in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-27-2014, 07:14 AM
  2. [SOLVED] Conditional Formatting - Using another cell to specify the colour??
    By lealea1982 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2012, 10:00 AM
  3. Conditional Formatting - Using another cell to specify the colour??
    By lealea1982 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-28-2012, 09:50 AM
  4. conditional formatting based on cell colour
    By nervous_pilchard in forum Excel General
    Replies: 0
    Last Post: 07-12-2011, 05:29 AM
  5. Conditional formatting by date-need to colour a cell
    By duckboy1981 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-08-2009, 06: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