+ Reply to Thread
Results 1 to 5 of 5

Conditional Formatting a date to change colors (excel 2007)

  1. #1
    Registered User
    Join Date
    02-11-2014
    Location
    Lexinton, SC
    MS-Off Ver
    Excel 2007
    Posts
    3

    Conditional Formatting a date to change colors (excel 2007)

    I am trying to conditionally format a date to change colors and can't seen to figure it out. E2 has the date of 16-Jun-14, F2 has a date of 14-May-14 (120 days from E2). 130 days out from E2, I need F2 to change to Yellow and 120 days out from E2, I need F2 to change to red. Can anyone help me with this please?

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,620

    Re: Conditional Formatting a date to change colors (excel 2007)

    DATEDIF(start_date,end_date,unit)
    Unit:
    "Y" The number of complete years in the period.
    "M" The number of complete months in the period.
    "D" The number of days in the period.
    So:

    CF:
    =DATEDIF(F2,E2,"D")>120 (?)
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    02-11-2014
    Location
    Lexinton, SC
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional Formatting a date to change colors (excel 2007)

    I am guessing I did something wrong since it didn't work for me. Attached is an example of the spreadsheet that I am working on. So on this one B2:B17 needs to change to red 90 days out and yellow 100 days out based of the date in A2:17.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-30-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Conditional Formatting a date to change colors (excel 2007)

    Hi CrazyEyes,

    Try below code, it could help you.... hope so....!

    Please Login or Register  to view this content.
    Note : add this code in sheet1

  5. #5
    Registered User
    Join Date
    02-11-2014
    Location
    Lexinton, SC
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional Formatting a date to change colors (excel 2007)

    I am not familiar with code. How does this work? Is the best way to get the dates to change color?

+ 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] Excel 2007: Conditional Formatting Rows Based on Date
    By Physicsboy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-04-2013, 05:48 PM
  2. Replies: 10
    Last Post: 05-20-2012, 08:41 AM
  3. Replies: 4
    Last Post: 09-16-2010, 03:38 AM
  4. [SOLVED] Excel 2007 : Conditional Formatting a Date Table?
    By THORmx in forum Excel General
    Replies: 9
    Last Post: 04-20-2009, 04:51 AM
  5. Replies: 41
    Last Post: 04-10-2009, 08:50 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