+ Reply to Thread
Results 1 to 6 of 6

Date plus 3 years and set to red

  1. #1
    Registered User
    Join Date
    11-30-2007
    Location
    Lancashire, UK
    MS-Off Ver
    1908
    Posts
    62

    Question Date plus 3 years and set to red

    Hi all, I have been trying my best to find a formula for the below.

    I have a date for example in format 13/03/11 and I want to be able to calculate 3 years from that date, if the 3 year date is less than today’s date I want the cell to turn red.

    Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Date plus 3 years and set to red

    Use this to get the 3-years-later date (with your starting date in A1):
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    To turn the cell red if it's less than today, do this:
    1. Select your range (the range you want to format).
    2. On the Home tab of the ribbon, click 'Conditional Formatting', then 'New Rule', then 'Use a formula to determine which cells to format'.
    3. In the formula box, enter this (replace 'A2' with the top-left cell of the range you selected at step 1):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    4. Click 'Format' then choose Red fill.
    5. Click OK twice to get back to the worksheet.

    Hope that helps.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Registered User
    Join Date
    11-30-2007
    Location
    Lancashire, UK
    MS-Off Ver
    1908
    Posts
    62

    Re: Date plus 3 years and set to red

    Hi, I must be doing something wrong as I don't seem to be able to get this formula to work?

    I have uploaded a sample of what I am trying to do, so the dates on the spreadsheet if they are over 3 years from that date shown then to turn red.

    Thanks Again
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Date plus 3 years and set to red

    Okay, I see what you want. I thought you wanted a new cell with the 3-years-later date, but you want the cell with the original date to turn red if it's more than 3 years ago.
    To do this, you need to include the EDATE in the Conditional Formatting (CF) formula.

    Here's the instructions again, updated for that:

    1. Select your range (the range you want to format) - probably F8:J13 (assuming the 'First Aid' currency is also 3-yearly).
    If that's not the case, then do first column F, then columns H:J.
    2. On the Home tab of the ribbon, click 'Conditional Formatting', then 'New Rule', then 'Use a formula to determine which cells to format'.
    3. In the formula box, enter this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The first part stops blank cells from turning red; the second part checks if the date plus three years is less than today.
    You can change the number of years by changing the '36' - it's the number of months.
    Change F8 to the top-left of your range, if necessary.
    4. Click 'Format' then choose Red text (or fill or whatever you want).
    5. Click OK twice to get back to the worksheet.

    I've attached your file with this working for the range F8 to J13.

    Hope that helps.

  5. #5
    Registered User
    Join Date
    11-30-2007
    Location
    Lancashire, UK
    MS-Off Ver
    1908
    Posts
    62

    Red face Re: Date plus 3 years and set to red

    Thank you very much this worked like a dream

  6. #6
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Date plus 3 years and set to red

    You're welcome, glad to be of help.

    If you're satisfied that your question has been answered, then please take a moment to mark the thread as Solved so others know there's an answer here (instructions are in my sig). Thanks.

+ 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] Help with Calculating date range over 7 years from current date
    By nr6281 in forum Excel Formulas & Functions
    Replies: 38
    Last Post: 08-13-2019, 01:37 AM
  2. Calculate Date 5 years in the future past today's date
    By RickCJ7 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-29-2015, 05:50 PM
  3. Highlight a cell with a date which is coming upto 5 years from a fixed date
    By ItsAllDinx in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-14-2015, 05:33 PM
  4. Pivot Table Date Adding 4 Years and 1 day to Source Data Date
    By dhanni in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 06-05-2014, 02:20 PM
  5. [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
  6. [SOLVED] How to determine how many fiscal years are present from start date to end date.
    By terrivega3500 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-07-2012, 01:25 PM
  7. Adding years to a date, but leaving blank if no date in the original cell.
    By buddyhackit9 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-12-2011, 01:17 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