+ Reply to Thread
Results 1 to 6 of 6

Conditional Coloring

  1. #1
    Registered User
    Join Date
    01-27-2011
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Conditional Coloring

    I run a workcenter where we do a LOT of traing and I need to keep track of expiration dates. I have found similar threads but none that quite have what I need. I have a spreadsheet with cells that have the date something expires in it. Everyone has different dates. If I have to format each cell individually I will no problem. I would like to set up the cell so that the icon (I like the traffic lights) changes from green to yellow when it is 30 days away from expiration and red when it is 14 days away. Can anyone help me? I really appreciate it!

    Glen

  2. #2
    Registered User
    Join Date
    09-26-2007
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Conditional Coloring

    Hy USMCavi,

    What you could do is add an extra column with the same date (so just a copy). Change the cell properties of these cells to text format.

    Also setup an extra cell with =Now(). Also change the cell property of this cell to text.

    They will then turn to numbers. This number wil be the days from somewhere in 1900 or so.

    What you can do on this column is an extra column with an if statement:
    if((New_Date_Cell-NOW_Cell)<30,1,if((New_Date_Cell-NOW_Cell)<14,2,0))

    The cell with this formula will return 1 if there is less then 30 days left. 2 when there is less then 14 days left. Else it returns 0.

    Then on this cell you put your conditional formatting like when cell value = 1 cell background = yellow, if cell value = 2 cell background = red and if cell value = 0 cell background = green...

    Hope this helps a bit. Didn't test this but something like it could work...
    http://www.squidoo.com/best-excel-2010-book

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Conditional Coloring

    As you mentioned traffic lights, I suppose you are using 2007 ?
    Please adapt your profile version accordingly - Thx

  4. #4
    Registered User
    Join Date
    01-27-2011
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Conditional Coloring

    Updated profile to 2007.

  5. #5
    Registered User
    Join Date
    01-27-2011
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Conditional Coloring

    pMzQ,
    Thanks for helping this far, it's almost working. However, even if it is 12 days out it still registers as <30 so it will ony display the values of 1 or 0. How can I modify this formula to show the 2 under 14 days?

  6. #6
    Registered User
    Join Date
    09-26-2007
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Conditional Coloring

    Hy USMCavi,

    Sorry the if statement was not optimal.

    New version:
    if(AND((New_Date_Cell-NOW_Cell)<30,(New_Date_Cell-NOW_Cell)>14,1,if((New_Date_Cell-NOW_Cell)<15,2,0))

    I think this could do the trick...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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