+ Reply to Thread
Results 1 to 11 of 11

How to Format Dates to Colors, That Are Over 1 Year, 2 Years, and 3+ Years

  1. #1
    Registered User
    Join Date
    07-29-2015
    Location
    Essington, Pennsylvania
    MS-Off Ver
    MS OFFICE 2010
    Posts
    9

    How to Format Dates to Colors, That Are Over 1 Year, 2 Years, and 3+ Years

    I need conditional formatting that would highlight dates in my chart that are 1 year (green), 2 years(yellow), and 3 years+(Red), and missing dates(red). I want them to refer to a specific date like from Sept 1, or whatever date i choose. I have tried different things, none work. Any help would be appreciated.
    Thanks!!
    Kim

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: How to Format Dates to Colors, That Are Over 1 Year, 2 Years, and 3+ Years

    Enter the date of interest 9/1/2015 into a cell - let's say cell B2.

    Then for the CF, select your cells with the dates and add a new rule, use the "Use a function to determine which cells to format" option, with a formula like this for the Red

    =XXXX<DATE(YEAR($B$2)-3,MONTH($B$2),DAY($B$2))

    where XXXX is the address of the the first of you selected date cells, like C5

    =C5<DATE(YEAR($B$2)-3,MONTH($B$2),DAY($B$2))

    Then add the others:

    Yellow:
    =C5<DATE(YEAR($B$2)-2,MONTH($B$2),DAY($B$2))
    Green:
    =C5<DATE(YEAR($B$2)-1,MONTH($B$2),DAY($B$2))
    And Red again:
    =C5=""
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    07-29-2015
    Location
    Essington, Pennsylvania
    MS-Off Ver
    MS OFFICE 2010
    Posts
    9

    Re: How to Format Dates to Colors, That Are Over 1 Year, 2 Years, and 3+ Years

    Thanks Bernie,
    But... it didn't work.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: How to Format Dates to Colors, That Are Over 1 Year, 2 Years, and 3+ Years

    Here you go....

    CF Format Dates.xlsx

  5. #5
    Registered User
    Join Date
    07-29-2015
    Location
    Essington, Pennsylvania
    MS-Off Ver
    MS OFFICE 2010
    Posts
    9

    Re: How to Format Dates to Colors, That Are Over 1 Year, 2 Years, and 3+ Years

    Bernie, I could kiss you right now! LOL
    I hope i can put it in my spreadsheet, and not screw it up. I did what you told me, and I'm a quick learner, this was just hard!!! Your so smart!
    Have a great weekend.

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: How to Format Dates to Colors, That Are Over 1 Year, 2 Years, and 3+ Years

    Well, it was my bad - I forgot to tell you that order is important, since a date that is 3 years or older is also 2 years or older and 1 year or older. So I also used the Stop if true option, so make sure you use that as well.

  7. #7
    Registered User
    Join Date
    07-29-2015
    Location
    Essington, Pennsylvania
    MS-Off Ver
    MS OFFICE 2010
    Posts
    9

    Re: How to Format Dates to Colors, That Are Over 1 Year, 2 Years, and 3+ Years

    Thanks, I will try it next week!!!

  8. #8
    Registered User
    Join Date
    07-29-2015
    Location
    Essington, Pennsylvania
    MS-Off Ver
    MS OFFICE 2010
    Posts
    9

    Re: How to Format Dates to Colors, That Are Over 1 Year, 2 Years, and 3+ Years

    Bernie,
    I hate to bother you AGAIN! But, I did exactly how you have them, there is a peach color in there and it doesn't seem to be working, i have attached my sheet, would you mind looking at it. I was just going to forget it, but i guess it can't hurt to ask. I do not know why this is so hard. List2 Formatting.xlsx
    Last edited by KAB923; 08-03-2015 at 07:51 AM.

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How to Format Dates to Colors, That Are Over 1 Year, 2 Years, and 3+ Years

    The dates that appear 'Peach' are NOT more than 1 year old, so none of the conditional format rules apply to those cells.
    'Peach' would appear to be the Standard Formatting Fill color for those cells.

  10. #10
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: How to Format Dates to Colors, That Are Over 1 Year, 2 Years, and 3+ Years

    That is the base format color. Select all the cells, and either remove the fill or select another color that you prefer.

  11. #11
    Registered User
    Join Date
    07-29-2015
    Location
    Essington, Pennsylvania
    MS-Off Ver
    MS OFFICE 2010
    Posts
    9

    Re: How to Format Dates to Colors, That Are Over 1 Year, 2 Years, and 3+ Years

    That's awesome, sorry i didn't realize it was the selected background, im like what the he** haha. Thanks again Bernie!

+ 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] Number of years between to dates, with corresponding year qualifier
    By nic716 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-31-2015, 11:54 AM
  2. Replies: 2
    Last Post: 11-18-2013, 12:22 PM
  3. Replies: 4
    Last Post: 10-17-2013, 09:59 AM
  4. [SOLVED] Age based on DOB; Accounts for leap years. Years old if >2, Months if <2 years old.
    By sharpmel in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-17-2013, 04:20 PM
  5. Replies: 2
    Last Post: 10-16-2012, 11:40 AM
  6. Replies: 4
    Last Post: 06-23-2011, 11:45 AM
  7. Replies: 1
    Last Post: 12-05-2005, 08:35 AM

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