+ Reply to Thread
Results 1 to 12 of 12

How to change a cell colour when a date is 11 months and then a year old

  1. #1
    Registered User
    Join Date
    07-12-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    17

    How to change a cell colour when a date is 11 months and then a year old

    I am using excel 2007 and trying to set up a spreadsheet where i can enter a date when a course has been taken and then 11 months after that date the cell would change to yellow and 1 year from the original date it would turn red. Anybody help me with this please?
    I'm a new member so hi to all
    Last edited by JBeaucaire; 07-13-2012 at 05:46 PM. Reason: Corrected thread title to topic only, as per forum rules

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to change a cell colour when a date is 11 months and then a year old

    Use conditional formatting, with a formula as the rule.

    Rule 1: format red: Formula =$A2<=EDATE(TODAY(),-12)

    Rule 2: format yellow: Formula =$A2<=EDATE(TODAY(),-11)

    A2 is used as an example range, this should be the cell that conatins, or will contain the date in question.

    If you're not familiar with conditional formatting then there is an introduction / tutorial here that will make more sense than I can http://www.contextures.com/xlCondFormat01.html

  3. #3
    Forum Contributor
    Join Date
    01-24-2011
    Location
    Sheppey
    MS-Off Ver
    Excel 2010
    Posts
    239

    Re: How to change a cell colour when a date is 11 months and then a year old

    If you have not got the Edate formula available to you try
    =NOW()>=DATE(YEAR(G6)+1,MONTH(G6),DAY(G6))
    =NOW()>=DATE(YEAR(G6),MONTH(G6)+11,DAY(G6))

  4. #4
    Registered User
    Join Date
    07-12-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: How to change a cell colour when a date is 11 months and then a year old

    Thanks Jason & Barry. Will try them later and report back. Thanks for all your help

  5. #5
    Registered User
    Join Date
    07-12-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: How to change a cell colour when a date is 11 months and then a year old

    I still dont seem to be able to complete it. Are the examples you gave for Excel 2007? Its probably me being a bit slow but my screen doesnt seem to match the ones shown and i cant seem to be able to add conditions. When i click on conditional formatting i get a few options. If i click on "Highlight cell rules" do i then click on "more rules"? I might just give up on the task as i'm finding it extremely frustrating :-(

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How to change a cell colour when a date is 11 months and then a year old

    Yes, the instructions apply to 2007.
    When you click on CF choose the New Rule option and from that screen choose the Use Formula option.
    You can also get there by choosing More rules from the Highlight Cell Rules.

  7. #7
    Registered User
    Join Date
    07-12-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: How to change a cell colour when a date is 11 months and then a year old

    Thank you. What do i put into the box that says "format values where this value is true" please? I am trying to format column C. Do i highlight all the cells that i need to format or just the first one, in this case C2?

  8. #8
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How to change a cell colour when a date is 11 months and then a year old

    I assume you mean: "Format values where this formula is true"

    That's where you put the formula suggested by Jason.b75 in post #2. Adjusting the ref, as he said, from $A2 to whatever your start cell ref is.
    You can either highlight the range before applying the CF or do it in the Applies To field which will appear when you select your format choice(s) and click OK.

    Note that the 2 rules must be in the proper sequence, as given in post #2.

  9. #9
    Registered User
    Join Date
    07-12-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: How to change a cell colour when a date is 11 months and then a year old

    That's brilliant, my cell now turns red when the date is over a year old. Next part is where do i put the 2nd rule as it never gave me the option todo that anywhere on the screen. It let me format it with the first rule but there wasn't anywhere to add another rule. Thanks for all your help so far

  10. #10
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to change a cell colour when a date is 11 months and then a year old

    Just repeat the process, the new rule will be added after the existing one.

    Or you can do it in the "manage rules" window from the conditional formatting menu.

  11. #11
    Registered User
    Join Date
    07-12-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: How to change a cell colour when a date is 11 months and then a year old

    Thank you very very much indeed, it works a treat. I have a couple of books on Excel but none of them are any good. I think i need to enrol on a course and do some practice

  12. #12
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How to change a cell colour when a date is 11 months and then a year old

    Glad you got it working, davezb. If you are satisfied with the solution(s) provided, please remember to mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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