+ Reply to Thread
Results 1 to 4 of 4

Conditional Formatting - Changing A Separate Cell's Colour If Another Cell Is Out Of Date

  1. #1
    Registered User
    Join Date
    03-27-2017
    Location
    UK
    MS-Off Ver
    2010
    Posts
    2

    Question Conditional Formatting - Changing A Separate Cell's Colour If Another Cell Is Out Of Date

    Hello Everyone,

    I've been trying hard to get this done myself, and I've tried following some online tutorials but I just don't seem to be getting anywhere.

    I am wanting to change a cell colour - which contains non-related data - depending on another cell's date in relation to the current date.

    For example.

    I would like to change the colour of cell B2 to green if the date contained within cell B3 is greater or equal to 1 year from the current date, yellow if cell B3 is less than 1 year from the current date, orange if cell B3 is less than six months from the current date, and red if the date in B3 is older than the current date.

    I hope that's clear enough!

    Green >or= 1 year from current date
    Yellow < 1 year but > or = 6 months
    Orange < 6 months but > or = current date
    Red < current date

    Thanks to anyone who can give me a hand.

  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: Conditional Formatting - Changing A Separate Cell's Colour If Another Cell Is Out Of D

    Welcome to the forum.

    Select the range you want to format (B2:AB2 for example).
    Click 'Conditional Formatting' then 'New Rule' then 'Use a formula to determine which cells to format'.
    Enter this rule into the formula box (labelled 'Format values where this formula is true') and choose Green fill using the 'Format' button:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Repeat using these formulae:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ↑ with Yellow fill,
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ↑ with Orange fill,
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ↑ with Red fill.

    That should do what you want.


    Edit:
    You could use simpler formulae if you were happy with 182 and 365 days in place of exact year / 6 months. For example, the yellow fill would then be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Aardigspook; 03-27-2017 at 10:21 AM.
    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
    03-27-2017
    Location
    UK
    MS-Off Ver
    2010
    Posts
    2

    Re: Conditional Formatting - Changing A Separate Cell's Colour If Another Cell Is Out Of D

    Aardigspook, you're a life saver, works perfectly - thankyou very much!

  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: Conditional Formatting - Changing A Separate Cell's Colour If Another Cell Is Out Of D

    You're welcome, glad to be of help and thanks for the rep.

    If that takes care of your original question, please take a moment to mark the thread as Solved so others know there's an answer here (see my sig for instructions). 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. Replies: 7
    Last Post: 06-27-2016, 01:11 AM
  2. Replies: 6
    Last Post: 04-11-2016, 09:48 AM
  3. Changing a Cell Value when Date has passed, Conditional formatting?
    By Robbie8 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-03-2016, 08:00 AM
  4. Replies: 1
    Last Post: 11-21-2013, 01:16 PM
  5. [SOLVED] Conditional Formatting to Change Cell Colour Based on Date
    By Kym2101 in forum Excel General
    Replies: 5
    Last Post: 05-01-2012, 11:41 PM
  6. Conditional formatting by date-need to colour a cell
    By duckboy1981 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-08-2009, 06:35 AM
  7. [SOLVED] Conditional formatting - different cell colour for each year following from user input date?
    By StargateFan in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 01-11-2006, 03:15 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