+ Reply to Thread
Results 1 to 11 of 11

Conditional Formatting, Date Greater Than 1 Year

  1. #1
    Registered User
    Join Date
    05-09-2006
    Posts
    6

    Conditional Formatting, Date Greater Than 1 Year

    Hello,

    I need to format a column of cells to highlight red when the date (which is formatted to look like 15-Nov-10) is greater than 1 year. Any help would be appreciated. Thanks.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional Formatting, Date Greater Than 1 Year

    greater than one year from when?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,662

    Re: Conditional Formatting, Date Greater Than 1 Year

    What does it mean for a date to be "greater than 1 year"? Do you mean 1 year greater than the current date?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Conditional Formatting, Date Greater Than 1 Year

    Hi,

    See the very similar post I responded to earlier today.

    http://www.excelforum.com/excel-gene...ecome-red.html

    Rgds
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Registered User
    Join Date
    05-09-2006
    Posts
    6

    Re: Conditional Formatting, Date Greater Than 1 Year

    Yes the current date. Example: today is 21-Nov-10, any date 21-Nov-09 or greater should be highlighted red.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,662

    Re: Conditional Formatting, Date Greater Than 1 Year

    Quote Originally Posted by jshpik1 View Post
    Yes the current date. Example: today is 21-Nov-10, any date 21-Nov-09 or greater should be highlighted red.
    See Richard Buttrey's linked post but instead of "=7" use "=365". And also provide the version of Excel you are using; the functionality and interface for conditional formatting in Excel 2007 and beyond is quite different than 2003 and prior.

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional Formatting, Date Greater Than 1 Year

    what about leap years?
    B1>=EOMONTH(EOMONTH(A1,-1)+1,11)+DAY(A1)
    mind you you might have to make that a named formula
    Last edited by martindwilson; 11-22-2010 at 04:17 AM.

  8. #8
    Registered User
    Join Date
    05-09-2006
    Posts
    6

    Re: Conditional Formatting, Date Greater Than 1 Year

    I've tried the formula at Richard's link and it doesn't seem to be working. I'm using Microsoft Excel 2007. So I go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format. I then paste this formula in the box that states "Format values where this formula is true"

    =TODAY()-A1>=365

    Click format and change the fill to red then hit ok. I've also change the format of the cells to hold that it should be a date which looks like 24-Nov-10. However on testing the formula I've entered 23-Nov-09 into the box. In this case the cell with the date 23-Nov-09 should be highlighted, and 25-Nov-09 should not be highlighted. Nothing happens. All that happens is the formula highlights some random row. Also if there is no value in the box, the conditional formating should do nothing. It doesn't need to be so accurate as to include leap years. Thanks.

  9. #9
    Registered User
    Join Date
    05-09-2006
    Posts
    6

    Re: Conditional Formatting, Date Greater Than 1 Year

    Sorry, it shouldn't be cell A1 that is highlighted. These dates are in column D and E rows 4 - 252.

  10. #10
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Conditional Formatting, Date Greater Than 1 Year

    Still not sure of your requirement, should 1st Jan 2010 be highlighted, it fulfills the requirement "any date 21-Nov-09 or greater should be highlighted red"?

    ....or do you want to highlight dates earlier than 21 Nov 2009, e.g. 1st Jan 2009?
    Audere est facere

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional Formatting, Date Greater Than 1 Year

    mine works fine lol

+ 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