+ Reply to Thread
Results 1 to 8 of 8

Conditional Formatting for Dates

  1. #1
    Registered User
    Join Date
    01-19-2016
    Location
    Glasgow
    MS-Off Ver
    2013
    Posts
    42

    Conditional Formatting for Dates

    Hi there, me again!

    Okay so I am trying to add a column that has the dates of the last inspection of a ship done by its Manager; they can't exceed 12months between visits; so I would like to be able to highlight the ships that have dates that are a year or more past today's date (and future dates upon which anyone is looking at the spreadsheet) in red, and have those that have been done within the last year of the date to be highlighted as green. I've looked at the template format formulas in the conditional formatting already, but don't think any of those will be of any use to me.

    Could anyone give me a hand please?
    Many thanks in advance!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Conditional Formatting for Dates

    It would help if you attached a sample Excel workbook, as you haven't given any details of the columns where the dates are located, so any proposed solution would have to guess these.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Please note that the Paperclip icon does not work.

    Pete

  3. #3
    Registered User
    Join Date
    01-19-2016
    Location
    Glasgow
    MS-Off Ver
    2013
    Posts
    42

    Re: Conditional Formatting for Dates

    I've had to remove all sensitive info - the formula will apply to column R in relation to cell C11. The formula will only apply to the Overview Sheet.
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Conditional Formatting for Dates

    You seem to have a number of Conditional Formats already applied, though they all relate to "Cell Value Is ...". It is much more flexible and powerful if you make use of "Use a Formula to determine which cells to format" when you set up a new rule, and with this option chosen a dialogue box pops up which allows you to enter a formula to govern the criteria. Your formula would probably be something like:

    =$C$11-$R15 > 365

    although as you have letters in column R then it might be better to use:

    =AND(ISNUMBER($R15),$C$11-$R15 > 365)

    Having said all that, though, I'm not really sure what you want, as you already have the sheet filled with pink, green and yellow cells, so could you explain exactly what you want to achieve?

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    01-19-2016
    Location
    Glasgow
    MS-Off Ver
    2013
    Posts
    42

    Re: Conditional Formatting for Dates

    The cells in column R are all red and they shouldn't be - only the ones that are past a year of todays date. The one's that are within a year should be green. That's exactly what I want to achieve, I don't know how to explain it any better, apologies.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Conditional Formatting for Dates

    There are 5 conditions on Column R two of which are > C11 and < C11 so unless they equal C11 they will be RED.

    And GREEN test is for "Y" not a date check.

    I left the "N" and "Y" conditions, delete the other RED and used Pete's formula

    =AND(ISNUMBER($R15),$C$11-$R15 > 365) RED

    =AND(ISNUMBER($R15),$C$11-$R15 < 365) GREEN

  7. #7
    Registered User
    Join Date
    01-19-2016
    Location
    Glasgow
    MS-Off Ver
    2013
    Posts
    42

    Re: Conditional Formatting for Dates

    Awesome, thank you very much!

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Conditional Formatting for Dates

    Strictly speaking, the second one should be <= 365, otherwise it won't be coloured if it is exactly a year.

    Pete

+ 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] Multi-Conditional Conditional Formatting and Dates
    By Mousiefuzz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-07-2015, 04:09 AM
  2. Conditional formatting using dates and using dates without years
    By dcef79 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-15-2014, 05:35 AM
  3. Replies: 11
    Last Post: 05-04-2014, 08:28 PM
  4. [SOLVED] Conditional Formatting Due dates and Completed Dates
    By shansen79 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-30-2014, 01:33 PM
  5. Conditional Formatting with approaching due dates and completed dates
    By rogernation in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-13-2013, 04:12 PM
  6. Replies: 4
    Last Post: 08-29-2013, 11:23 AM
  7. [SOLVED] Conditional Formatting of: dates within 1 month and dates before today.
    By Luke Smith in forum Excel General
    Replies: 5
    Last Post: 06-18-2013, 07:29 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