+ Reply to Thread
Results 1 to 4 of 4

Conditional formatting - color gradient based on another cell's value

  1. #1
    Registered User
    Join Date
    06-15-2022
    Location
    Belgium
    MS-Off Ver
    365
    Posts
    2

    Question Conditional formatting - color gradient based on another cell's value

    Hi All,

    I'm struggling with a problem and hoping one of you can help me.

    I'm organizing an event and I have a big tasklist in excel of things that have to be done by a certain duedate.
    This original file was horribly outdated and a mess.. BUT it's functions and formulas were working.

    I had to change the "look" of the file.. bot for some reason I can't get the conditional formatting on the due dates to work.

    Explanation:

    CELL A1 is the due date.
    CELL B1 is the state. (OK, NOOK, BUSY, NA)
    The event date is set to 2022-11-24

    The date in CELL A1 is based on a little formula that we decided on by which date each task has to be completed on. (basically event date minus X days)

    GOAL:

    Whenever a state in CELL B1 is "BUSY" or "NOOK" we want to apply a gradient color on the CELL A1. based on how close we are on the due date.
    (10 days before the due date it starts getting slightly yellow and more orange towards the due date, and when it passes the due date it should go towards red)
    When the state in CELL B1 is "OK" or "NA" nothing should happen.

    Any help would be MUCH appreciated.. I have been trying to fix this for days.. tried workarounds found on google.. but never could find the exact fix to my problem.

    Thanks in advance!

    Edit: added a test/sample file.
    Attached Files Attached Files
    Last edited by dro0p; 06-21-2022 at 07:36 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,282

    Re: Conditional formatting - color gradient based on another cell's value

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    06-15-2022
    Location
    Belgium
    MS-Off Ver
    365
    Posts
    2

    Re: Conditional formatting - color gradient based on another cell's value

    I added a sample file.. Not sure if that makes sense.. I can't get it to work.

    1. C2 = The event date.
    2. Whenever something in column D is set to either "BUSY" or "NOK" I want a color gradient to happen on the cells in column C.
    3. I want the color gradient to start off easy light orange 14 days before that date in column C, and gradually move towards heavy orange on the date itself and plain red 10 days after that date.

    If anybody could help, would be greatly appreciated.
    Tried many things.. but I can't figure it out.

    Thanks in advance.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,522

    Re: Conditional formatting - color gradient based on another cell's value

    As for the conditional formatting rule for 'OK', 'NVT', <C2-14 and >C2+10 (when there should be no highlighting): =OR(D4="OK",D4="NVT",C4<C$2-14,C4>C$2+10)
    For gradient colors: Set minimum to yellow and maximum to red.
    Note that in order to show this I changed dates in C5:C20 so that they were within the range Nov. 8th to Dec. 8th of 2022.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Conditional formatting data bars color gradient
    By orerockon in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-15-2020, 05:17 PM
  2. Replies: 2
    Last Post: 09-02-2018, 01:09 PM
  3. Conditional formatting gradient based on frequency of text entries
    By geobeck in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-09-2018, 01:52 PM
  4. Add conditional formatting based on color of a cell
    By dreddster in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-12-2015, 04:54 AM
  5. [SOLVED] Gradient color formating based on another worksheet cell.
    By SamCV in forum Excel General
    Replies: 1
    Last Post: 11-26-2013, 04:08 PM
  6. Change Cell Color to Gradient Based on Adjacent Cell Colors
    By Weathertuck in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2013, 04:49 PM
  7. Replies: 5
    Last Post: 05-10-2012, 10:49 PM

Tags for this Thread

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